← Back to team overview

kicad-developers team mailing list archive

Re: Drawing loop in VIEW::draw

 

On Fri, Nov 01, 2013 at 05:35:10PM +0100, Maciej Sumiński wrote:
> Groups are handled by rendering backends and are identified only by their
> number (think of it as a handle) and there is a 1-to-1 relation between
> group id and VIEW_ITEM/layer combination.

That makes suspiciously easy to use display lists or VBOs:P

Another thing I've seen mentioned around: targets?

Also I can't see a thing when I switch to cairo (my fault probably).

> VIEW_GROUPs are particularly useful when drawing on the overlay layer
> (destined for drawing temporary objects) and in that case you may need to
> draw a single item layer by layer rather than drawing layer by layer, but
> using all items.
> For usual drawing of items, you should have a look at draw():607 - this is
> where caching VIEW_ITEMs/redrawing groups happen.

MMmmm more or less is clear. Could you check that loop anyway? otherwise
I can't find a way to match types.

Now at least it compiles and links, and that's a major step...
however it... well... doesn't work exactly fine:D it seems that somehow
the layer mapping got messed up so I can always see pads, for example,
but never traces. Other things are correctly shown hidden... Some
tracing required

And now, for something completely different: there is a 'should not
occur' condition which actually happens. In D_PAD::ViewGetLayers only
the copper side of the pad is considered, and I'm not sure it's entirely
correct: for example the first case considers pads on both front and
back pushing in the requested layers both mask and paste (but I suppose
that's only a slight inefficiency). Often however dummy pads are used
for paste reduction or mask controlled openings. These are pads which
resides in no copper layer. I think the best way to handle this function
would be to loop over the pad layer mask and simply add the flagged
layers. Of course the ITEM_GAL_LAYER entities would still need special
treatment.

-- 
Lorenzo Marcantonio
Logos Srl


Follow ups

References