On 05/15/2012 06:51 AM, Edwin van den Oetelaar wrote:
> On Tue, May 15, 2012 at 1:31 PM, Lorenzo Marcantonio
> <[email protected]> wrote:
>> At last I remade the work...
>>
>>
>> 016     The layer number from int becomes LAYER_NUM (original name!)
>>
>> 017     Replaced all the ugly (1 << layer) with GetLayerMask
>>
>> 018     Layer bitmaps (like visibles, enabled and so on) become
>>        LAYER_MSK (which aligns to LAYER_NUM!)
> Why is this stored in a bitmask anyway? Now everything depends on
> #define INT_BITS
> would not a <vector> or simple array[] make more sense?

Since all objects are in a single display list rather than organized by layer, 
being able
to select which objects are displayed based on layer is a time critical 
operation.

An integer bitmask is very efficient, and probably the fastest way to make this 
subset
extraction, since it can be done with a single bit wise AND test.


Dick



_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to