kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #07502
Re: Drawing the layers clearly.
On 21 February 2012 11:01, Brian Sidebotham <brian.sidebotham@xxxxxxxxx> wrote:
> On 21 February 2012 07:25, Miguel Angel Ajo Pelayo <miguelangel@xxxxxxx> wrote:
>>
>> I've been playing around with the code, and learning a little bit how
>> does kicad draw everything.
>>
>> I'm also quite new to KiCad, and I'm getting used to work with the tool. It
>> was surprising for me
>> that the layers are painted using GR_OR operation.
>>
>> Is it implemented this way because you find it more clear to work this way?
>> or is it implemented
>> this way to simplify (/speedup) the drawing process?
>>
>> For me, it would seem nicer (may be it's just what I'm used to):
>>
>> Drawing without OR/XOR/etc, just drawing, in order:
>>
>> 1) tracks bottom-up for all the layers (excluding: current one, and
>> current overlay one)
>> 2) tracks of the current layer
>> 3) the current overlay (current overlay = nearest one to the current
>> layer)
>> 4) vias, pads, etc.
>>
>> It must be a little bit more time consuming, since (in plain implementation)
>> we may need to
>> iterate all over the lists at least 3 times (1,2,3). Better implementation
>> could be done
>> with a little more of memory usage.
>>
>>
>> If it's something that the project finds interesting, I could be doing
>> it. Even if there is a 50%/50% and
>> the code could be done in such way that doesn't become harder to maintain,
>> also both modes could be kept.
>>
>>
>> Cheers,
>>
>> --
>>
>> Miguel Angel Ajo Pelayo
>> http://www.nbee.es
>> +34 636 52 25 69
>> skype: ajoajoajo
>
> Hi Miguel,
>
> The drawing code is as it is in order to efficient whilst allowing the
> layers to be visible through each other. For example, where a Front
> track crosses over a Back track we would see the OR'd result of the
> two layer colours where they cross. This is a very handy feature - I
> have only ever known PCB layout packages to use this method of
> compositing the view. Nowadays though transparency is generally used
> instead.
>
> See Torsten's work on a Graphics Abstracion Layer for KiCad:
> https://code.launchpad.net/~kicad-testing-committers/kicad/kicad-gal
>
> Best Regards,
>
> Brian.
Looking at the commit's on that branch, it looks like I should have
said "See Torsten and Dick's work on a Graphics Abstraction Layer for
KiCad:"
Apologies Dick.
Best Regards,
Brian.
Follow ups
References