Re: [Kicad-developers] GerbView GAL port

2017-02-15 Thread jp charras
Le 15/02/2017 à 15:54, Jon Evans a écrit :
> Hi all, thanks for the feedback.
> 
> Jon -- I will reach out to Mark and see what his plans are/were.

Remember many of his code is already in Kicad.

> 
> JP -- Thanks for the explanation
> 
> Tom -- Thanks for the explanation.  I agree it's a good idea to look into 
> Cairo for printing.

If the Cairo graphic layer can be used to print on all platforms, this is OK.

Especially on Windows, the printing for wxDC is broken with Postscript (and 
therefore PDF) printers
(lines thickness is incorrect).
I am thinking this is a Windows bug, because it is OK with non postscript 
printers.

> 
> Yes, I should be able to fix the issue with PAINTER.
> 
> -Jon
> 
> On Wed, Feb 15, 2017 at 3:44 AM, Tomasz Wlostowski  > wrote:
> 
> On 14.02.2017 19:38, Jon Evans wrote:
> > Hi all,
> >
> > I want to get familiar with the GAL codebase, and it occurred to me that
> > it might be fun to play with porting GerbView to GAL.  I know it is on
> > the 6.x roadmap, but it seemed to me that it would be mostly not
> > dependent on any other changes that I see on the roadmap or have seen
> > people talking about on the mailing list.
> >
> Hi Jon,
> 
> Many thanks for your involvement. I think working on a GAL port of
> GerbView is a great idea, even though it's not planned (yet) for the
> nearest release.
> 
> > - Is anyone currently working on this?
> 
> I don't think so.
> 
> >
> > - If a GAL port is "feature-complete", is there any reason for the app
> > to retain the legacy graphics code, or can it just provide OpenGL and
> > Cairo backends?  My impression is the only think keeping legacy canvas
> > in pcbnew is feature differences between legacy and GAL, but I wanted to
> > check if there are other reasons.
> 
> Except for printing mentioned by JP, there's no reason to keep legacy
> drawing code. I'm quite sure, though, printing could be handled by
> GAL-Cairo with some minor modifications.
> 
> >
> > - In my first hour of looking at the code for this, it seems like the
> > GAL code currently has some interdependence with pcbnew that needs to be
> > straightened out before using GAL in other applications.  For example,
> > EDA_DRAW_PANEL_GAL depends on PCB_PAINTER, not a generic PAINTER.  Is
> > this an open problem for anyone to tackle, or does anyone actively have
> > plans to refactor this?
> 
> It's an obvious mistake, EDA_DRAW_PANEL_GAL should depend on the base
> PAINTER class, and the PCB_PAINTER should be created in the
> PCB_DRAW_PANEL_GAL. Would you be able to fix this?
> 
> Cheers,
> Tom
> 
> 
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


-- 
Jean-Pierre CHARRAS

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] GerbView GAL port

2017-02-15 Thread Jon Evans
Hi all, thanks for the feedback.

Jon -- I will reach out to Mark and see what his plans are/were.

JP -- Thanks for the explanation

Tom -- Thanks for the explanation.  I agree it's a good idea to look into
Cairo for printing.

Yes, I should be able to fix the issue with PAINTER.

-Jon

On Wed, Feb 15, 2017 at 3:44 AM, Tomasz Wlostowski <
tomasz.wlostow...@cern.ch> wrote:

> On 14.02.2017 19:38, Jon Evans wrote:
> > Hi all,
> >
> > I want to get familiar with the GAL codebase, and it occurred to me that
> > it might be fun to play with porting GerbView to GAL.  I know it is on
> > the 6.x roadmap, but it seemed to me that it would be mostly not
> > dependent on any other changes that I see on the roadmap or have seen
> > people talking about on the mailing list.
> >
> Hi Jon,
>
> Many thanks for your involvement. I think working on a GAL port of
> GerbView is a great idea, even though it's not planned (yet) for the
> nearest release.
>
> > - Is anyone currently working on this?
>
> I don't think so.
>
> >
> > - If a GAL port is "feature-complete", is there any reason for the app
> > to retain the legacy graphics code, or can it just provide OpenGL and
> > Cairo backends?  My impression is the only think keeping legacy canvas
> > in pcbnew is feature differences between legacy and GAL, but I wanted to
> > check if there are other reasons.
>
> Except for printing mentioned by JP, there's no reason to keep legacy
> drawing code. I'm quite sure, though, printing could be handled by
> GAL-Cairo with some minor modifications.
>
> >
> > - In my first hour of looking at the code for this, it seems like the
> > GAL code currently has some interdependence with pcbnew that needs to be
> > straightened out before using GAL in other applications.  For example,
> > EDA_DRAW_PANEL_GAL depends on PCB_PAINTER, not a generic PAINTER.  Is
> > this an open problem for anyone to tackle, or does anyone actively have
> > plans to refactor this?
>
> It's an obvious mistake, EDA_DRAW_PANEL_GAL should depend on the base
> PAINTER class, and the PCB_PAINTER should be created in the
> PCB_DRAW_PANEL_GAL. Would you be able to fix this?
>
> Cheers,
> Tom
>
>
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] GerbView GAL port

2017-02-15 Thread Tomasz Wlostowski
On 14.02.2017 19:38, Jon Evans wrote:
> Hi all,
> 
> I want to get familiar with the GAL codebase, and it occurred to me that
> it might be fun to play with porting GerbView to GAL.  I know it is on
> the 6.x roadmap, but it seemed to me that it would be mostly not
> dependent on any other changes that I see on the roadmap or have seen
> people talking about on the mailing list.
> 
Hi Jon,

Many thanks for your involvement. I think working on a GAL port of
GerbView is a great idea, even though it's not planned (yet) for the
nearest release.

> - Is anyone currently working on this?

I don't think so.

> 
> - If a GAL port is "feature-complete", is there any reason for the app
> to retain the legacy graphics code, or can it just provide OpenGL and
> Cairo backends?  My impression is the only think keeping legacy canvas
> in pcbnew is feature differences between legacy and GAL, but I wanted to
> check if there are other reasons.

Except for printing mentioned by JP, there's no reason to keep legacy
drawing code. I'm quite sure, though, printing could be handled by
GAL-Cairo with some minor modifications.

> 
> - In my first hour of looking at the code for this, it seems like the
> GAL code currently has some interdependence with pcbnew that needs to be
> straightened out before using GAL in other applications.  For example,
> EDA_DRAW_PANEL_GAL depends on PCB_PAINTER, not a generic PAINTER.  Is
> this an open problem for anyone to tackle, or does anyone actively have
> plans to refactor this?

It's an obvious mistake, EDA_DRAW_PANEL_GAL should depend on the base
PAINTER class, and the PCB_PAINTER should be created in the
PCB_DRAW_PANEL_GAL. Would you be able to fix this?

Cheers,
Tom



___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] GerbView GAL port

2017-02-15 Thread jp charras
Le 14/02/2017 à 19:38, Jon Evans a écrit :
> Hi all,
> 
> I want to get familiar with the GAL codebase, and it occurred to me that it 
> might be fun to play
> with porting GerbView to GAL.  I know it is on the 6.x roadmap, but it seemed 
> to me that it would be
> mostly not dependent on any other changes that I see on the roadmap or have 
> seen people talking
> about on the mailing list.
> 
> - Is anyone currently working on this?
> 
> - Does anyone think it would be a bad idea for me to start working on this 
> now?
> 
> - If a GAL port is "feature-complete", is there any reason for the app to 
> retain the legacy graphics
> code, or can it just provide OpenGL and Cairo backends?  My impression is the 
> only think keeping
> legacy canvas in pcbnew is feature differences between legacy and GAL, but I 
> wanted to check if
> there are other reasons.
> 
> - In my first hour of looking at the code for this, it seems like the GAL 
> code currently has some
> interdependence with pcbnew that needs to be straightened out before using 
> GAL in other
> applications.  For example, EDA_DRAW_PANEL_GAL depends on PCB_PAINTER, not a 
> generic PAINTER.  Is
> this an open problem for anyone to tackle, or does anyone actively have plans 
> to refactor this?
> 
> Best,
> Jon

Hi Jon,

I don't think there is a work in progress on this.

To answer to these questions:

Our "GAL" covers 2 very different things:
* The new GAL canvas using currently OpenGL and Cairo backends.
* A new way to handle events from menus.

I am talking here only of the GAL canvas.
Currently, the GAL port is not a "feature-complete".
It is missing the current wxDC backend.
It was planned, but I am thinking it is not really started (At least I am not 
aware of).
(I just wrote a very minimal stub (basic_gal.h) to use in legacy canvas a few 
methods from GAL
canvas to draw/plot a text.
This is made to avoid duplicate code, and different rendering of texts)

If the current legacy drawing code is removed, the wxDC backend is needed for 
the printing system,
which uses the wxDC.

Now, OpenGL and Cairo backends are powerful and fast.

Note also the "legacy" wxDC works fine on wxGTK built with GTK2, but does not 
work if wxGTK is built
with GTK3 (I am guessing under GTK3, the wxDC graphic layer is Cairo, and some 
of graphic operations
(OR, XOR) used in Kicad are no longer available).

So, in short, porting GerbView to GAL canvas is very important, because one day 
our current wxDC
will be not available.

However, Gerbview should be not depending on any Pcbnew code, especially 
PCB_PAINTER.
Note also Gerbview has very few menus events handlers.

-- 
Jean-Pierre CHARRAS

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] GerbView GAL port

2017-02-14 Thread Jon Neal
This doesn't answer any of your questions, but Mark Roszko did some
refactoring of gerbview that had some really nice changes. I believe he
started the refactoring with the intention of switching gerbview over to
GAL.

https://github.com/marekr/kicad-devel

Jon Neal

On Tue, Feb 14, 2017 at 1:38 PM Jon Evans  wrote:

> Hi all,
>
> I want to get familiar with the GAL codebase, and it occurred to me that
> it might be fun to play with porting GerbView to GAL.  I know it is on the
> 6.x roadmap, but it seemed to me that it would be mostly not dependent on
> any other changes that I see on the roadmap or have seen people talking
> about on the mailing list.
>
> - Is anyone currently working on this?
>
> - Does anyone think it would be a bad idea for me to start working on this
> now?
>
> - If a GAL port is "feature-complete", is there any reason for the app to
> retain the legacy graphics code, or can it just provide OpenGL and Cairo
> backends?  My impression is the only think keeping legacy canvas in pcbnew
> is feature differences between legacy and GAL, but I wanted to check if
> there are other reasons.
>
> - In my first hour of looking at the code for this, it seems like the GAL
> code currently has some interdependence with pcbnew that needs to be
> straightened out before using GAL in other applications.  For example,
> EDA_DRAW_PANEL_GAL depends on PCB_PAINTER, not a generic PAINTER.  Is this
> an open problem for anyone to tackle, or does anyone actively have plans to
> refactor this?
>
> Best,
> Jon
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] GerbView GAL port

2017-02-14 Thread Jon Evans
Hi all,

I want to get familiar with the GAL codebase, and it occurred to me that it
might be fun to play with porting GerbView to GAL.  I know it is on the 6.x
roadmap, but it seemed to me that it would be mostly not dependent on any
other changes that I see on the roadmap or have seen people talking about
on the mailing list.

- Is anyone currently working on this?

- Does anyone think it would be a bad idea for me to start working on this
now?

- If a GAL port is "feature-complete", is there any reason for the app to
retain the legacy graphics code, or can it just provide OpenGL and Cairo
backends?  My impression is the only think keeping legacy canvas in pcbnew
is feature differences between legacy and GAL, but I wanted to check if
there are other reasons.

- In my first hour of looking at the code for this, it seems like the GAL
code currently has some interdependence with pcbnew that needs to be
straightened out before using GAL in other applications.  For example,
EDA_DRAW_PANEL_GAL depends on PCB_PAINTER, not a generic PAINTER.  Is this
an open problem for anyone to tackle, or does anyone actively have plans to
refactor this?

Best,
Jon
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp