← Back to team overview

kicad-developers team mailing list archive

Re: GerbView GAL

 

Thanks JP.
For #2, it is a matter of the difference between OpenGL and Cairo
implementation of transparency and occlusion in our GAL.  Cairo also has
the issue that each draw item is composited with transparency, even on a
single layer. (maybe that is what is wanted with transparent items
sometimes, but it is an inconsistency between OpenGL and Cairo that needs
to be resolved).

I think one solution could be to interpret negative items at the geometry
creation stage rather than at the rendering stage.  That is, if you have a
negative item on a layer, do a boolean subtraction from the existing
positive geometry.  Then just pass the resulting geometry to the GAL to
draw, rather than trying to add support to GAL for drawing "subtractively"
like was done in wxDC.

-Jon

On Mon, Sep 11, 2017 at 2:44 PM, jp charras <jp.charras@xxxxxxxxxx> wrote:

> Le 10/09/2017 à 02:42, Jon Evans a écrit :
> > Hi all,
> >
> > I've finally had time in the last few weeks to make more progress on
> GerbView GAL.
> >
> > While it's not perfect, I think it is far enough along to propose
> merging into the main repo, so
> > that more people can start testing it and hopefully we can fix any bugs
> and perhaps get more people
> > working on the remaining features.
> >
> > There are two big missing features:
> > 1) Printing (still uses the wx canvas)
> > 2) Negative images
> >
> > The first one probably involves porting the print engine from wxDC to
> Cairo, and the second one
> > probably can be implemented by doing transformations of the negative
> geometry into positive geometry
> > for rendering (negative images are implemented using the wxDC
> compositing mode which GAL doesn't
> > support right now).
> >
> > Other than those things, everything I have tried is working (all of the
> test files in the source
> > tree and a number of my own boards).
> >
> > I'd like some input from the maintainers about whether or not this is in
> an acceptable state to
> > merge into master, and if not, what changes I should make first.  If
> everything looks okay, I will
> > format my branch into a series of patches and send to the list.
> >
> > You can view the source here:
> > https://github.com/craftyjon/kicad/tree/gerbview_gal
> > or clone
> > git@xxxxxxxxxx:craftyjon/kicad.git
> > and checkout gerbview_gal
> >
> > Best,
> > Jon
>
> Thanks Jon for all this (great) work.
> I tested you branch and it is very acceptable to me.
> And I know maintaining a branch during a long time when it has a lot of
> changes is really not easy.
>
> I saw a few (minor) issues, but nothing blocking. They can be fixed later.
>
>
> My remarks:
>
> * "1) Printing (still uses the wx canvas)":
> This is also true for Pcbnew. this is not specific to Gerbview.
>
> * I noticed negative objects are well drawn in Opengl canvas, but not in
> Cairo canvas.
> Just an idea: Gerbv uses Cairo canvas, so perhaps having a look at Gerbv
> could help.
>
> * "2) Negative images": I cannot not help you about that:
> my knowledge of Opengl or Cairo is very basic.
> Perhaps CERN guys can help you.
>
> --
> Jean-Pierre CHARRAS
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References