Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-10-16 Thread Jeff Young
Thanks, Mark.  I’ve merged a fix.

Cheers,
Jeff.


> On 16 Oct 2018, at 21:07, mdoes...@xs4all.nl wrote:
> 
> Found another bug. When importing sheet pins, the pin can be placed and
> is visible during placement. Once placed it is no-longer visible. When I
> quit eeschema and start it with the same file, the sheet label is visible
> and right where I left it.
> 
> regards,
> 
> Mark.


___
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] GAL canvas strategy - testers needed!

2018-10-16 Thread mdoesbur
Found another bug. When importing sheet pins, the pin can be placed and
is visible during placement. Once placed it is no-longer visible. When I
quit eeschema and start it with the same file, the sheet label is visible
and right where I left it.

regards,

Mark.

___
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] GAL canvas strategy - testers needed!

2018-09-22 Thread Jeff Young
Patch pushed.

Cheers,
Jeff.


> On 22 Sep 2018, at 16:35, Maciej Suminski  wrote:
> 
> One more patch to fix off grid component placement after paste
> operation. Apart from that, the result is very impressive. Well done!
> 
> Cheers,
> Orson
> 
> On 9/19/18 11:16 PM, Jeff Young wrote:
>> A couple of more commits are up (including backing out the polyline change).
> <0001-Fix-off-grid-block-paste.patch>


___
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] GAL canvas strategy - testers needed!

2018-09-22 Thread Maciej Suminski
One more patch to fix off grid component placement after paste
operation. Apart from that, the result is very impressive. Well done!

Cheers,
Orson

On 9/19/18 11:16 PM, Jeff Young wrote:
> A couple of more commits are up (including backing out the polyline change).
>From bbd0912ff57618884b915719ce895907159ffc53 Mon Sep 17 00:00:00 2001
From: Maciej Suminski 
Date: Sat, 22 Sep 2018 17:25:37 +0200
Subject: [PATCH] Fix off-grid block paste

Center point of a block may not always be located on a grid point,
therefore it needs to be rounded to the grid size to prevent off grid
component placement.
---
 eeschema/sch_base_frame.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eeschema/sch_base_frame.cpp b/eeschema/sch_base_frame.cpp
index 589e0a60c..d897c2589 100644
--- a/eeschema/sch_base_frame.cpp
+++ b/eeschema/sch_base_frame.cpp
@@ -540,7 +540,8 @@ bool SCH_BASE_FRAME::HandleBlockBegin( wxDC* aDC, EDA_KEY aKey, const wxPoint& a
 InitBlockPasteInfos();
 
 KIGFX::PREVIEW::SELECTION_AREA* sel = GetCanvas()->GetView()->GetSelectionArea();
-VECTOR2I offsetToCenter = ( sel->GetOrigin() - sel->GetEnd() ) / 2;
+VECTOR2I offsetToCenter = GetCanvas()->GetGAL()->GetGridPoint(
+( sel->GetOrigin() - sel->GetEnd() ) / 2 );
 block->SetLastCursorPosition( wxPoint( offsetToCenter.x, offsetToCenter.y ) );
 
 if( block->GetCount() == 0 )  // No data to paste
-- 
2.18.0

___
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] GAL canvas strategy - testers needed!

2018-09-19 Thread Jeff Young
A couple of more commits are up (including backing out the polyline change).

> On 19 Sep 2018, at 19:27, jp charras  wrote:
> 
> Le 19/09/2018 à 13:01, Rene Pöschl a écrit :
>> On 19/09/2018 11:54, jp charras wrote:
>>> Le 19/09/2018 à 11:40, Rene Pöschl a écrit :
 Ok i looked at the pot symbols. They are indeed strange. (ignore my last
 message)
 
 However, how does the new fill algorithm work with things like the logic
 gates. (Example the symbol for 74LS00) It has an open polygon on purpose
 as it consists of that polygon plus an arc. We still want the body do be
 filled but do not want a visible line between the arc and the polygon
 body.
>>> There is no problem with 74LS00 and 74LS02 shapes.
>>> 
>>> You could find an issue with a 74LS32, but the polygon used as a filled
>>> shape is broken: its line width is set to -1000 mils, a bit strange.
>>> 
>> 
>> The reason for that is that kicad did not (or does not) support filling
>> shapes with concave arcs in it. So the outline was made with arcs and
>> lines whereas the filled part was made with a single polygon that
>> approximates the shape needed. To reduce the number of needed line
>> segments the shape is approximated quite crudely. This works because the
>> filled shape does not have an outline to it. (Meaning the errors in it
>> are hidden by the true outline that is created from arcs) As setting
>> line width to 0 does not result in a polygon of 0 width the trick with
>> the large negative value was used to achieve this.
> 
> I understand.
> But a better way could be using the minimal width (1 mil) because 0 is
> (for historical reasons) selecting the default pen size value.
> 1 mil should work fine in this case.
> 
> A negative value has serious issues:
> - As a width it has currently no sense.
> - polylines with line thickness <= 0 cannot be selected: it means you
> cannot edit/move or delete them. This is the most annoying issue.
> 
> -- 
> 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 
> 
___
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] GAL canvas strategy - testers needed!

2018-09-19 Thread jp charras
Le 19/09/2018 à 13:01, Rene Pöschl a écrit :
> On 19/09/2018 11:54, jp charras wrote:
>> Le 19/09/2018 à 11:40, Rene Pöschl a écrit :
>>> Ok i looked at the pot symbols. They are indeed strange. (ignore my last
>>> message)
>>>
>>> However, how does the new fill algorithm work with things like the logic
>>> gates. (Example the symbol for 74LS00) It has an open polygon on purpose
>>> as it consists of that polygon plus an arc. We still want the body do be
>>> filled but do not want a visible line between the arc and the polygon
>>> body.
>> There is no problem with 74LS00 and 74LS02 shapes.
>>
>> You could find an issue with a 74LS32, but the polygon used as a filled
>> shape is broken: its line width is set to -1000 mils, a bit strange.
>>
> 
> The reason for that is that kicad did not (or does not) support filling
> shapes with concave arcs in it. So the outline was made with arcs and
> lines whereas the filled part was made with a single polygon that
> approximates the shape needed. To reduce the number of needed line
> segments the shape is approximated quite crudely. This works because the
> filled shape does not have an outline to it. (Meaning the errors in it
> are hidden by the true outline that is created from arcs) As setting
> line width to 0 does not result in a polygon of 0 width the trick with
> the large negative value was used to achieve this.

I understand.
But a better way could be using the minimal width (1 mil) because 0 is
(for historical reasons) selecting the default pen size value.
1 mil should work fine in this case.

A negative value has serious issues:
- As a width it has currently no sense.
- polylines with line thickness <= 0 cannot be selected: it means you
cannot edit/move or delete them. This is the most annoying issue.

-- 
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] GAL canvas strategy - testers needed!

2018-09-19 Thread jp charras
Le 19/09/2018 à 18:20, Jeff Young a écrit :
> Hi JP,
> 
> Do you think it’s worth checking the colours of the stroke and fill, or just 
> remove the change and require that the libraries get fixed?

just remove the change and require that the libraries get fixed is
enough for me.

If an used want a closed polygon instead of a polyline (not closed
polygon, this is his responsibility to draw a closed polygon.

> 
> (Why doesn’t the original issue show up with legacy?  Maybe it is checking 
> for stroke == fill and then closing the polygons?)

AFAIK, there is no check.
Perhaps Draw functions in legacy canvas do not need a closed polygon.

> 
> Cheers,
> Jeff.


-- 
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] GAL canvas strategy - testers needed!

2018-09-19 Thread Jeff Young
Hi JP,

Do you think it’s worth checking the colours of the stroke and fill, or just 
remove the change and require that the libraries get fixed?

(Why doesn’t the original issue show up with legacy?  Maybe it is checking for 
stroke == fill and then closing the polygons?)

Cheers,
Jeff.



___
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] GAL canvas strategy - testers needed!

2018-09-19 Thread jp charras
Le 19/09/2018 à 17:36, Jeff Young a écrit :
> The 74LS00 in my (admittedly dated) library aren’t filled.  Are they in more 
> recent libraries?
> 
> (If so, we’ll need to back out my change as it will indeed affect them.)
> 

Hi Jeff,

your commit e6734def0 create issues with filled bodies:
The comment say:
"Make sure filled polygons are closed when rendering"

But Eeschema do not use polygons, only polylines (of course if closed it
is a polygon...)
When filled by foreground color, one can close the polygon because the
added segment has the same color as the outline, but not when filled
with background color, because closing the polyline add a unwanted (an
unnecessary) segment to the polyline.

-- 
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] GAL canvas strategy - testers needed!

2018-09-19 Thread Bob Gustafson

Yes, a good chuckle

On 9/19/18 10:36 AM, Jeff Young wrote:

The 74LS00 in my (admittedly dated) library


___
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] GAL canvas strategy - testers needed!

2018-09-19 Thread Jeff Young
The 74LS00 in my (admittedly dated) library aren’t filled.  Are they in more 
recent libraries?

(If so, we’ll need to back out my change as it will indeed affect them.)

___
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] GAL canvas strategy - testers needed!

2018-09-19 Thread Rene Pöschl

On 19/09/2018 11:54, jp charras wrote:

Le 19/09/2018 à 11:40, Rene Pöschl a écrit :

Ok i looked at the pot symbols. They are indeed strange. (ignore my last
message)

However, how does the new fill algorithm work with things like the logic
gates. (Example the symbol for 74LS00) It has an open polygon on purpose
as it consists of that polygon plus an arc. We still want the body do be
filled but do not want a visible line between the arc and the polygon body.

There is no problem with 74LS00 and 74LS02 shapes.

You could find an issue with a 74LS32, but the polygon used as a filled
shape is broken: its line width is set to -1000 mils, a bit strange.



The reason for that is that kicad did not (or does not) support filling 
shapes with concave arcs in it. So the outline was made with arcs and 
lines whereas the filled part was made with a single polygon that 
approximates the shape needed. To reduce the number of needed line 
segments the shape is approximated quite crudely. This works because the 
filled shape does not have an outline to it. (Meaning the errors in it 
are hidden by the true outline that is created from arcs) As setting 
line width to 0 does not result in a polygon of 0 width the trick with 
the large negative value was used to achieve this.


___
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] GAL canvas strategy - testers needed!

2018-09-19 Thread jp charras
Le 19/09/2018 à 11:40, Rene Pöschl a écrit :
> Ok i looked at the pot symbols. They are indeed strange. (ignore my last
> message)
> 
> However, how does the new fill algorithm work with things like the logic
> gates. (Example the symbol for 74LS00) It has an open polygon on purpose
> as it consists of that polygon plus an arc. We still want the body do be
> filled but do not want a visible line between the arc and the polygon body.

There is no problem with 74LS00 and 74LS02 shapes.

You could find an issue with a 74LS32, but the polygon used as a filled
shape is broken: its line width is set to -1000 mils, a bit strange.


> 
> On 19/09/2018 00:04, Jeff Young wrote:
>> I pushed John’s 3 patches along with one of my own which fixes the POT
>> rendering.
>>
>> (It is actually an error in the library item, but it’s not alone -- at
>> least optocoupler IL300 has the same issue.)
>>
>> Cheers,
>> Jeff.


-- 
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] GAL canvas strategy - testers needed!

2018-09-19 Thread Rene Pöschl
Ok i looked at the pot symbols. They are indeed strange. (ignore my last 
message)


However, how does the new fill algorithm work with things like the logic 
gates. (Example the symbol for 74LS00) It has an open polygon on purpose 
as it consists of that polygon plus an arc. We still want the body do be 
filled but do not want a visible line between the arc and the polygon body.


On 19/09/2018 00:04, Jeff Young wrote:

I pushed John’s 3 patches along with one of my own which fixes the POT 
rendering.

(It is actually an error in the library item, but it’s not alone -- at least 
optocoupler IL300 has the same issue.)

Cheers,
Jeff.



On 18 Sep 2018, at 15:10, John Beard  wrote:

Hi,

The rendering of unclosed polyline in symbols is different in GAL.

See the attached (standard libs potentiometer symbol) - in the legacy
canvas, the arrow doesn't have a missing lower side.

Is this a bug in GAL, or is it actually intended and the symbol is
wrong (but happened to work before by accident)?

Cheers,

John
On Tue, Sep 18, 2018 at 12:35 AM Jeff Young  wrote:

There’s a setting for that (Always show crosshairs).  You probably have it on 
in Pcbnew/Display Options but not in Eeschema/Display Options.


On 18 Sep 2018, at 00:30, Wayne Stambaugh  wrote:

I don't know if this is intentional or not but I noticed (at least on
windows) that the cursor is no longer displayed when the select tool is
active.  This is different than the old canvas where the cursor always
tracked the mouse point for all tools.

Cheers,

Wayne

On 9/17/2018 7:21 PM, Jeff Young wrote:

I pushed fixes for sheet pins and the cursor.  (It also removes a bunch of 
legacy grid and cursor colour stuff that is no longer needed.)

Cheers,
Jeff.



On 17 Sep 2018, at 20:03, mdoes...@xs4all.nl wrote:

I don't think I mailed the list, but also found another issue.

I noticed the sheet text is the same color as "notes", and not "sheet
label".

The cursor cross-hair is always black.

Otherwise it works fine for me on a quick test.

regards,

Mark.


___
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


___
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

<2018-09-18_150628_607x389_screenshot.png>


___
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


Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-19 Thread Rene Pöschl
Could you go into detail in how the library item is at fault? Or at 
least how it should be fixed?


On 19/09/2018 00:04, Jeff Young wrote:

I pushed John’s 3 patches along with one of my own which fixes the POT 
rendering.

(It is actually an error in the library item, but it’s not alone -- at least 
optocoupler IL300 has the same issue.)

Cheers,
Jeff.



On 18 Sep 2018, at 15:10, John Beard  wrote:

Hi,

The rendering of unclosed polyline in symbols is different in GAL.

See the attached (standard libs potentiometer symbol) - in the legacy
canvas, the arrow doesn't have a missing lower side.

Is this a bug in GAL, or is it actually intended and the symbol is
wrong (but happened to work before by accident)?

Cheers,

John
On Tue, Sep 18, 2018 at 12:35 AM Jeff Young  wrote:

There’s a setting for that (Always show crosshairs).  You probably have it on 
in Pcbnew/Display Options but not in Eeschema/Display Options.


On 18 Sep 2018, at 00:30, Wayne Stambaugh  wrote:

I don't know if this is intentional or not but I noticed (at least on
windows) that the cursor is no longer displayed when the select tool is
active.  This is different than the old canvas where the cursor always
tracked the mouse point for all tools.

Cheers,

Wayne

On 9/17/2018 7:21 PM, Jeff Young wrote:

I pushed fixes for sheet pins and the cursor.  (It also removes a bunch of 
legacy grid and cursor colour stuff that is no longer needed.)

Cheers,
Jeff.



On 17 Sep 2018, at 20:03, mdoes...@xs4all.nl wrote:

I don't think I mailed the list, but also found another issue.

I noticed the sheet text is the same color as "notes", and not "sheet
label".

The cursor cross-hair is always black.

Otherwise it works fine for me on a quick test.

regards,

Mark.


___
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


___
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

<2018-09-18_150628_607x389_screenshot.png>


___
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


Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-18 Thread Jeff Young
I pushed John’s 3 patches along with one of my own which fixes the POT 
rendering.

(It is actually an error in the library item, but it’s not alone -- at least 
optocoupler IL300 has the same issue.)

Cheers,
Jeff.


> On 18 Sep 2018, at 15:10, John Beard  wrote:
> 
> Hi,
> 
> The rendering of unclosed polyline in symbols is different in GAL.
> 
> See the attached (standard libs potentiometer symbol) - in the legacy
> canvas, the arrow doesn't have a missing lower side.
> 
> Is this a bug in GAL, or is it actually intended and the symbol is
> wrong (but happened to work before by accident)?
> 
> Cheers,
> 
> John
> On Tue, Sep 18, 2018 at 12:35 AM Jeff Young  wrote:
>> 
>> There’s a setting for that (Always show crosshairs).  You probably have it 
>> on in Pcbnew/Display Options but not in Eeschema/Display Options.
>> 
>>> On 18 Sep 2018, at 00:30, Wayne Stambaugh  wrote:
>>> 
>>> I don't know if this is intentional or not but I noticed (at least on
>>> windows) that the cursor is no longer displayed when the select tool is
>>> active.  This is different than the old canvas where the cursor always
>>> tracked the mouse point for all tools.
>>> 
>>> Cheers,
>>> 
>>> Wayne
>>> 
>>> On 9/17/2018 7:21 PM, Jeff Young wrote:
 I pushed fixes for sheet pins and the cursor.  (It also removes a bunch of 
 legacy grid and cursor colour stuff that is no longer needed.)
 
 Cheers,
 Jeff.
 
 
> On 17 Sep 2018, at 20:03, mdoes...@xs4all.nl wrote:
> 
> I don't think I mailed the list, but also found another issue.
> 
> I noticed the sheet text is the same color as "notes", and not "sheet
> label".
> 
> The cursor cross-hair is always black.
> 
> Otherwise it works fine for me on a quick test.
> 
> regards,
> 
> Mark.
 
 
 ___
 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
>> 
>> 
>> ___
>> 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
> <2018-09-18_150628_607x389_screenshot.png>


___
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] GAL canvas strategy - testers needed!

2018-09-18 Thread Wayne Stambaugh
Hi John,

The line is definitely in the R_POT symbol (at least in the Device
symbol library) so it's possible that it is a gal bug.

Cheers,

Wayne

On 9/18/2018 10:10 AM, John Beard wrote:
> Hi,
> 
> The rendering of unclosed polyline in symbols is different in GAL.
> 
> See the attached (standard libs potentiometer symbol) - in the legacy
> canvas, the arrow doesn't have a missing lower side.
> 
> Is this a bug in GAL, or is it actually intended and the symbol is
> wrong (but happened to work before by accident)?
> 
> Cheers,
> 
> John
> On Tue, Sep 18, 2018 at 12:35 AM Jeff Young  wrote:
>>
>> There’s a setting for that (Always show crosshairs).  You probably have it 
>> on in Pcbnew/Display Options but not in Eeschema/Display Options.
>>
>>> On 18 Sep 2018, at 00:30, Wayne Stambaugh  wrote:
>>>
>>> I don't know if this is intentional or not but I noticed (at least on
>>> windows) that the cursor is no longer displayed when the select tool is
>>> active.  This is different than the old canvas where the cursor always
>>> tracked the mouse point for all tools.
>>>
>>> Cheers,
>>>
>>> Wayne
>>>
>>> On 9/17/2018 7:21 PM, Jeff Young wrote:
 I pushed fixes for sheet pins and the cursor.  (It also removes a bunch of 
 legacy grid and cursor colour stuff that is no longer needed.)

 Cheers,
 Jeff.


> On 17 Sep 2018, at 20:03, mdoes...@xs4all.nl wrote:
>
> I don't think I mailed the list, but also found another issue.
>
> I noticed the sheet text is the same color as "notes", and not "sheet
> label".
>
> The cursor cross-hair is always black.
>
> Otherwise it works fine for me on a quick test.
>
> regards,
>
> Mark.


 ___
 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
>>
>>
>> ___
>> 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


Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-18 Thread Jon Evans
I bet this is a difference in behavior in GAL, I had to deal with this a
bunch for the GerbView port.  GAL vs. legacy handles the last point in a
polyline/polygon differently although I'm not at my code and so I can't
remember which way the difference goes.

On Tue, Sep 18, 2018 at 10:08 AM John Beard  wrote:

> Hi,
>
> The rendering of unclosed polyline in symbols is different in GAL.
>
> See the attached (standard libs potentiometer symbol) - in the legacy
> canvas, the arrow doesn't have a missing lower side.
>
> Is this a bug in GAL, or is it actually intended and the symbol is
> wrong (but happened to work before by accident)?
>
> Cheers,
>
> John
> On Tue, Sep 18, 2018 at 12:35 AM Jeff Young  wrote:
> >
> > There’s a setting for that (Always show crosshairs).  You probably have
> it on in Pcbnew/Display Options but not in Eeschema/Display Options.
> >
> > > On 18 Sep 2018, at 00:30, Wayne Stambaugh 
> wrote:
> > >
> > > I don't know if this is intentional or not but I noticed (at least on
> > > windows) that the cursor is no longer displayed when the select tool is
> > > active.  This is different than the old canvas where the cursor always
> > > tracked the mouse point for all tools.
> > >
> > > Cheers,
> > >
> > > Wayne
> > >
> > > On 9/17/2018 7:21 PM, Jeff Young wrote:
> > >> I pushed fixes for sheet pins and the cursor.  (It also removes a
> bunch of legacy grid and cursor colour stuff that is no longer needed.)
> > >>
> > >> Cheers,
> > >> Jeff.
> > >>
> > >>
> > >>> On 17 Sep 2018, at 20:03, mdoes...@xs4all.nl wrote:
> > >>>
> > >>> I don't think I mailed the list, but also found another issue.
> > >>>
> > >>> I noticed the sheet text is the same color as "notes", and not "sheet
> > >>> label".
> > >>>
> > >>> The cursor cross-hair is always black.
> > >>>
> > >>> Otherwise it works fine for me on a quick test.
> > >>>
> > >>> regards,
> > >>>
> > >>> Mark.
> > >>
> > >>
> > >> ___
> > >> 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
> >
> >
> > ___
> > 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
>
___
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] GAL canvas strategy - testers needed!

2018-09-18 Thread John Beard
Hi,

The rendering of unclosed polyline in symbols is different in GAL.

See the attached (standard libs potentiometer symbol) - in the legacy
canvas, the arrow doesn't have a missing lower side.

Is this a bug in GAL, or is it actually intended and the symbol is
wrong (but happened to work before by accident)?

Cheers,

John
On Tue, Sep 18, 2018 at 12:35 AM Jeff Young  wrote:
>
> There’s a setting for that (Always show crosshairs).  You probably have it on 
> in Pcbnew/Display Options but not in Eeschema/Display Options.
>
> > On 18 Sep 2018, at 00:30, Wayne Stambaugh  wrote:
> >
> > I don't know if this is intentional or not but I noticed (at least on
> > windows) that the cursor is no longer displayed when the select tool is
> > active.  This is different than the old canvas where the cursor always
> > tracked the mouse point for all tools.
> >
> > Cheers,
> >
> > Wayne
> >
> > On 9/17/2018 7:21 PM, Jeff Young wrote:
> >> I pushed fixes for sheet pins and the cursor.  (It also removes a bunch of 
> >> legacy grid and cursor colour stuff that is no longer needed.)
> >>
> >> Cheers,
> >> Jeff.
> >>
> >>
> >>> On 17 Sep 2018, at 20:03, mdoes...@xs4all.nl wrote:
> >>>
> >>> I don't think I mailed the list, but also found another issue.
> >>>
> >>> I noticed the sheet text is the same color as "notes", and not "sheet
> >>> label".
> >>>
> >>> The cursor cross-hair is always black.
> >>>
> >>> Otherwise it works fine for me on a quick test.
> >>>
> >>> regards,
> >>>
> >>> Mark.
> >>
> >>
> >> ___
> >> 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
>
>
> ___
> 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


Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-18 Thread John Beard
Hi,

Here are a handful of tiny fixes for warnings in the eeschema GAL
branch. Nothing really controversial, I think (though the second one
fixes quite a verbose tranche of warnings - one for almost every type
of object :-).

Cheers,

John
On Tue, Sep 18, 2018 at 12:35 AM Jeff Young  wrote:
>
> There’s a setting for that (Always show crosshairs).  You probably have it on 
> in Pcbnew/Display Options but not in Eeschema/Display Options.
>
> > On 18 Sep 2018, at 00:30, Wayne Stambaugh  wrote:
> >
> > I don't know if this is intentional or not but I noticed (at least on
> > windows) that the cursor is no longer displayed when the select tool is
> > active.  This is different than the old canvas where the cursor always
> > tracked the mouse point for all tools.
> >
> > Cheers,
> >
> > Wayne
> >
> > On 9/17/2018 7:21 PM, Jeff Young wrote:
> >> I pushed fixes for sheet pins and the cursor.  (It also removes a bunch of 
> >> legacy grid and cursor colour stuff that is no longer needed.)
> >>
> >> Cheers,
> >> Jeff.
> >>
> >>
> >>> On 17 Sep 2018, at 20:03, mdoes...@xs4all.nl wrote:
> >>>
> >>> I don't think I mailed the list, but also found another issue.
> >>>
> >>> I noticed the sheet text is the same color as "notes", and not "sheet
> >>> label".
> >>>
> >>> The cursor cross-hair is always black.
> >>>
> >>> Otherwise it works fine for me on a quick test.
> >>>
> >>> regards,
> >>>
> >>> Mark.
> >>
> >>
> >> ___
> >> 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
>
>
> ___
> 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
From 062377a66836c02b38f58fd6daa6fc12b4b624f3 Mon Sep 17 00:00:00 2001
From: John Beard 
Date: Tue, 18 Sep 2018 14:41:06 +0100
Subject: [PATCH 2/3] Add default case in edit_label.cpp (-Wswitch)

This should never ben hit as it's defended against above,
but lack of a default causes lots of -Wswitch warnings, so
add an assert and a return.
---
 eeschema/edit_label.cpp | 4 
 1 file changed, 4 insertions(+)

diff --git a/eeschema/edit_label.cpp b/eeschema/edit_label.cpp
index 8fca11b0e..b6da029b3 100644
--- a/eeschema/edit_label.cpp
+++ b/eeschema/edit_label.cpp
@@ -186,6 +186,10 @@ void SCH_EDIT_FRAME::OnConvertTextType( wxCommandEvent& aEvent )
 case SCH_TEXT_T:
 newtext = new SCH_TEXT( position, txt );
 break;
+
+default:
+wxASSERT_MSG( false, wxString::Format( "Invalid text type: %d.", type ) );
+return;
 }
 
 /* Copy the old text item settings to the new one.  Justifications are not copied because
-- 
2.18.0

From e1e4a9ff307bbe01bb60ecee673b717fd51e2e32 Mon Sep 17 00:00:00 2001
From: John Beard 
Date: Tue, 18 Sep 2018 14:45:52 +0100
Subject: [PATCH 3/3] Fix -Wreorder warning in common view-overlay.cpp

Simple fix - m_radius comes after m_{start,end}Angle in the class member list.
---
 common/view/view_overlay.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/view/view_overlay.cpp b/common/view/view_overlay.cpp
index a09734985..78543a156 100644
--- a/common/view/view_overlay.cpp
+++ b/common/view/view_overlay.cpp
@@ -77,9 +77,9 @@ struct VIEW_OVERLAY::COMMAND_ARC : public VIEW_OVERLAY::COMMAND
 {
 COMMAND_ARC( const VECTOR2D& aCenter, double aRadius, double aStartAngle, double aEndAngle ) :
 m_center(aCenter),
-m_radius(aRadius),
 m_startAngle( aStartAngle ),
-m_endAngle( aEndAngle )
+m_endAngle( aEndAngle ),
+m_radius(aRadius)
 {}
 
 virtual void Execute( VIEW* aView ) const override
-- 
2.18.0

From 9b14e5fc6577e2b08252281d9960b8198c62f008 Mon Sep 17 00:00:00 2001
From: John Beard 
Date: Tue, 18 Sep 2018 14:30:23 +0100
Subject: [PATCH 1/3] Remove unused variable from pcbnew/onrightclick.cpp

---
 pcbnew/onrightclick.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp
index a01d92673..4c0f30a54 100644
--- a/pcbnew/onrightclick.cpp
+++ b/pcbnew/onrightclick.cpp
@@ -393,8 +393,6 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
 
 case ID_NO_TOOL_SELECTED:
 {
-wxMenu* commands = new wxMenu;
-  
 if( !trackFound )
 {
 msg = AddHotkeyName( _( "Begin Track" ), g_Board_Editor_Hotkeys_Descr, HK_ADD_NEW_TRACK );

Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-17 Thread Jeff Young
There’s a setting for that (Always show crosshairs).  You probably have it on 
in Pcbnew/Display Options but not in Eeschema/Display Options.

> On 18 Sep 2018, at 00:30, Wayne Stambaugh  wrote:
> 
> I don't know if this is intentional or not but I noticed (at least on
> windows) that the cursor is no longer displayed when the select tool is
> active.  This is different than the old canvas where the cursor always
> tracked the mouse point for all tools.
> 
> Cheers,
> 
> Wayne
> 
> On 9/17/2018 7:21 PM, Jeff Young wrote:
>> I pushed fixes for sheet pins and the cursor.  (It also removes a bunch of 
>> legacy grid and cursor colour stuff that is no longer needed.)
>> 
>> Cheers,
>> Jeff.
>> 
>> 
>>> On 17 Sep 2018, at 20:03, mdoes...@xs4all.nl wrote:
>>> 
>>> I don't think I mailed the list, but also found another issue.
>>> 
>>> I noticed the sheet text is the same color as "notes", and not "sheet
>>> label".
>>> 
>>> The cursor cross-hair is always black.
>>> 
>>> Otherwise it works fine for me on a quick test.
>>> 
>>> regards,
>>> 
>>> Mark.
>> 
>> 
>> ___
>> 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


___
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] GAL canvas strategy - testers needed!

2018-09-17 Thread Wayne Stambaugh
I don't know if this is intentional or not but I noticed (at least on
windows) that the cursor is no longer displayed when the select tool is
active.  This is different than the old canvas where the cursor always
tracked the mouse point for all tools.

Cheers,

Wayne

On 9/17/2018 7:21 PM, Jeff Young wrote:
> I pushed fixes for sheet pins and the cursor.  (It also removes a bunch of 
> legacy grid and cursor colour stuff that is no longer needed.)
> 
> Cheers,
> Jeff.
> 
> 
>> On 17 Sep 2018, at 20:03, mdoes...@xs4all.nl wrote:
>>
>> I don't think I mailed the list, but also found another issue.
>>
>> I noticed the sheet text is the same color as "notes", and not "sheet
>> label".
>>
>> The cursor cross-hair is always black.
>>
>> Otherwise it works fine for me on a quick test.
>>
>> regards,
>>
>> Mark.
> 
> 
> ___
> 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


Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-17 Thread Jeff Young
I pushed fixes for sheet pins and the cursor.  (It also removes a bunch of 
legacy grid and cursor colour stuff that is no longer needed.)

Cheers,
Jeff.


> On 17 Sep 2018, at 20:03, mdoes...@xs4all.nl wrote:
> 
> I don't think I mailed the list, but also found another issue.
> 
> I noticed the sheet text is the same color as "notes", and not "sheet
> label".
> 
> The cursor cross-hair is always black.
> 
> Otherwise it works fine for me on a quick test.
> 
> regards,
> 
> Mark.


___
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] GAL canvas strategy - testers needed!

2018-09-17 Thread mdoesbur
I don't think I mailed the list, but also found another issue.

I noticed the sheet text is the same color as "notes", and not "sheet
label".

The cursor cross-hair is always black.

Otherwise it works fine for me on a quick test.

regards,

Mark.

___
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] GAL canvas strategy - testers needed!

2018-09-17 Thread Jeff Young
JP’s latest has been pushed.

Cheers,
Jeff


> On 17 Sep 2018, at 11:41, jp charras  wrote:
> 
> Le 16/09/2018 à 23:37, Jeff Young a écrit :
>> I pushed JP’s commit and another that fixes up zoom & scroll issues
>> entering and leaving sheets.
>> 
>> Cheers,
>> Jeff.
> 
> Thanks.
> 
> Attached a new patch that fixes a Eeschema crash created by commit fcd80cdb
> (when using SYMBOL_PREVIEW_WIDGET, due to a null pointer used in
> onPaint() ).
> 
> It also fixes a few rendering artifacts.
> 
> 
> -- 
> Jean-Pierre CHARRAS
> <0001-Fix-a-Eeschema-crash-when-using-a-SYMBOL_PREVIEW_WID.patch>___
> 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


Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-17 Thread jp charras
Le 16/09/2018 à 23:37, Jeff Young a écrit :
> I pushed JP’s commit and another that fixes up zoom & scroll issues
> entering and leaving sheets.
> 
> Cheers,
> Jeff.

Thanks.

Attached a new patch that fixes a Eeschema crash created by commit fcd80cdb
(when using SYMBOL_PREVIEW_WIDGET, due to a null pointer used in
onPaint() ).

It also fixes a few rendering artifacts.


-- 
Jean-Pierre CHARRAS
From a42631df241339ce6c60477167b5c555b75521cf Mon Sep 17 00:00:00 2001
From: jean-pierre charras 
Date: Mon, 17 Sep 2018 11:22:11 +0200
Subject: [PATCH] Fix a Eeschema crash when using a SYMBOL_PREVIEW_WIDGET. Fix
 also a few draw artifacts.

---
 common/draw_panel_gal.cpp  | 15 +++--
 eeschema/sch_painter.cpp   |  3 -
 eeschema/widgets/symbol_preview_widget.cpp | 75 +-
 eeschema/widgets/symbol_preview_widget.h   |  5 ++
 4 files changed, 62 insertions(+), 36 deletions(-)

diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp
index 25787ad88..81397a4a3 100644
--- a/common/draw_panel_gal.cpp
+++ b/common/draw_panel_gal.cpp
@@ -163,10 +163,16 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( 
aEvent ) )
 KIGFX::RENDER_SETTINGS* settings = static_cast( 
m_painter->GetSettings() );
 
 m_viewControls->UpdateScrollbars();
-GetParentEDAFrame()->GetScreen()->SetZoom( GetLegacyZoom() );
 
-VECTOR2D center = GetView()->GetCenter();
-GetParentEDAFrame()->SetScrollCenterPosition( wxPoint( center.x, center.y 
) );
+// Update current zoom settings if the canvas is managed by a EDA frame
+// (i.e. not by a preview panel in a dialog)
+if( GetParentEDAFrame() && GetParentEDAFrame()->GetScreen() )
+{
+GetParentEDAFrame()->GetScreen()->SetZoom( GetLegacyZoom() );
+
+VECTOR2D center = GetView()->GetCenter();
+GetParentEDAFrame()->SetScrollCenterPosition( wxPoint( center.x, 
center.y ) );
+}
 
 try
 {
@@ -184,7 +190,8 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( 
aEvent ) )
 
 if( m_view->IsDirty() )
 {
-if( m_backend != GAL_TYPE_OPENGL )   // already called in opengl
+if( m_backend != GAL_TYPE_OPENGL && // Already called in opengl
+m_view->IsTargetDirty( KIGFX::TARGET_NONCACHED ) )
 m_gal->ClearScreen();
 
 m_view->ClearTargets();
diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp
index fe579b8f4..c1ba3cf4b 100644
--- a/eeschema/sch_painter.cpp
+++ b/eeschema/sch_painter.cpp
@@ -421,9 +421,6 @@ void SCH_PAINTER::draw( LIB_POLYLINE *aLine, int aLayer )
 for( auto p : aLine->GetPolyPoints() )
 vtx.push_back ( mapCoords( p ) );
 
-//if( aLine->GetFillMode() == FILLED_WITH_BG_BODYCOLOR || 
aLine->GetFillMode() == FILLED_SHAPE )
-//vtx.push_back( vtx[0] );
-
 m_gal->DrawPolygon( vtx );
 }
 
diff --git a/eeschema/widgets/symbol_preview_widget.cpp 
b/eeschema/widgets/symbol_preview_widget.cpp
index cd9a0d8b8..d994809e7 100644
--- a/eeschema/widgets/symbol_preview_widget.cpp
+++ b/eeschema/widgets/symbol_preview_widget.cpp
@@ -68,6 +68,8 @@ SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET( wxWindow* 
aParent, KIWAY& aKiway,
 m_statusSizer->ShowItems( false );
 
 SetSizer( outer_sizer );
+
+Connect( wxEVT_SIZE, wxSizeEventHandler( SYMBOL_PREVIEW_WIDGET::onSize ), 
NULL, this );
 }
 
 
@@ -87,6 +89,42 @@ void SYMBOL_PREVIEW_WIDGET::SetStatusText( wxString const& 
aText )
 }
 
 
+void SYMBOL_PREVIEW_WIDGET::onSize( wxSizeEvent& aEvent )
+{
+aEvent.Skip();
+
+if( m_previewItem )
+{
+fitOnDrawArea();
+m_preview->ForceRefresh();
+}
+}
+
+
+void SYMBOL_PREVIEW_WIDGET::fitOnDrawArea()
+{
+if( !m_previewItem )
+return;
+
+// set the view scale to fit the item on screen
+// Calculate the draw scale to fit the drawing area
+KIGFX::VIEW* view = m_preview->GetView();
+
+// Calculate the drawing area size, in internal units, for a scaling 
factor = 1.0
+view->SetScale( 1.0 );
+VECTOR2D  clientSize = view->ToWorld( m_preview->GetClientSize(), false );
+doublescale = std::min( fabs( clientSize.x / m_itemBBox.GetWidth() ),
+fabs( clientSize.y / m_itemBBox.GetHeight() ) 
);
+
+// Above calculation will yield an exact fit; add a bit of whitespace 
around symbol
+scale /= 1.2;
+
+// Now fix the best scale
+view->SetScale( scale );
+view->SetCenter( m_itemBBox.Centre() );
+}
+
+
 void SYMBOL_PREVIEW_WIDGET::DisplaySymbol( const LIB_ID& aSymbolID, int aUnit )
 {
 KIGFX::VIEW* view = m_preview->GetView();
@@ -128,22 +166,11 @@ void SYMBOL_PREVIEW_WIDGET::DisplaySymbol( const LIB_ID& 
aSymbolID, int aUnit )
 view->Add( alias );
 m_previewItem = alias;
 
-// Calculate the draw scale to fit the drawing area
-
-// First, get the symbole size, in internal units
-BOX2I bBox = 

Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-16 Thread Jeff Young
I pushed JP’s commit and another that fixes up zoom & scroll issues entering 
and leaving sheets.

Cheers,
Jeff.


> On 16 Sep 2018, at 16:03, jp charras  wrote:
> 
> Le 16/09/2018 à 15:08, Jeff Young a écrit :
>> I pushed a bunch of CLangTidy fixes and a fix for the grid colour.
>> 
>> Cheers,
>> Jeff.
>> 
> 
> Hi Jeff,
> Attached a patch to fix some artifacts when drawing items.
> 
> Cheers,
> 
>> 
>>> On 16 Sep 2018, at 08:40, mdoes...@xs4all.nl wrote:
>>> 
>>> I've given the GAL version a test-drive. Here are some issues I noted.
>>> I guess most of it is because the black background was not tested before.
>>> 
>>> 1. Grid color always black. (Not visible on black background) 
>>> 2. Hierarchical sheet color always white.
>>> 3. When using another background color (for example 1,1,1) the sheet
>>>  color is correct after zooming.  When moving the mouse the sheet color
>>>  gradually changes to white. Sometimes a double picture is shown, see
>>>  attachment. The background color was 1,1,1 for this schematic.
>>> 
> 
> 
> -- 
> Jean-Pierre CHARRAS
> <0001-Fix-some-artifacts-when-drawing-items-both-on-Cairo-.patch>___
> 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


Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-16 Thread jp charras
Le 16/09/2018 à 15:08, Jeff Young a écrit :
> I pushed a bunch of CLangTidy fixes and a fix for the grid colour.
> 
> Cheers,
> Jeff.
> 

Hi Jeff,
Attached a patch to fix some artifacts when drawing items.

Cheers,

> 
>> On 16 Sep 2018, at 08:40, mdoes...@xs4all.nl wrote:
>>
>> I've given the GAL version a test-drive. Here are some issues I noted.
>> I guess most of it is because the black background was not tested before.
>>
>> 1. Grid color always black. (Not visible on black background) 
>> 2. Hierarchical sheet color always white.
>> 3. When using another background color (for example 1,1,1) the sheet
>>   color is correct after zooming.  When moving the mouse the sheet color
>>   gradually changes to white. Sometimes a double picture is shown, see
>>   attachment. The background color was 1,1,1 for this schematic.
>> 


-- 
Jean-Pierre CHARRAS
From 533553983c01ac8d1a68a665174326672a385b05 Mon Sep 17 00:00:00 2001
From: jean-pierre charras 
Date: Sun, 16 Sep 2018 13:30:18 +0200
Subject: [PATCH] Fix some artifacts when drawing items, both on Cairo and
 Opengl.

Fix also incorrect selection of De Morgan style selection in 
SYMBOL_PREVIEW_WIDGET.
---
 common/draw_panel_gal.cpp  | 10 +-
 common/gal/cairo/cairo_gal.cpp | 17 +
 eeschema/sch_painter.cpp   | 18 +-
 eeschema/widgets/symbol_preview_widget.cpp |  7 +++
 include/gal/graphics_abstraction_layer.h   | 10 ++
 5 files changed, 52 insertions(+), 10 deletions(-)

diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp
index 543769151..69a99f2e2 100644
--- a/common/draw_panel_gal.cpp
+++ b/common/draw_panel_gal.cpp
@@ -172,9 +172,17 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( 
aEvent ) )
 m_gal->SetClearColor( settings->GetBackgroundColor() );
 m_gal->SetCursorColor( settings->GetLayerColor( LAYER_CURSOR ) );
 
+// TODO: find why ClearScreen() must be called here in opengl mode
+// and only if m_view->IsDirty() in Cairo mode to avoid distaly 
artifacts
+// when moving the mouse cursor
+if( m_backend == GAL_TYPE_OPENGL )
+m_gal->ClearScreen();
+
 if( m_view->IsDirty() )
 {
-m_gal->ClearScreen();
+if( m_backend != GAL_TYPE_OPENGL )   // already called in opengl
+m_gal->ClearScreen();
+
 m_view->ClearTargets();
 
 // Grid has to be redrawn only when the NONCACHED target is redrawn
diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp
index d9834b469..06b0acbd7 100644
--- a/common/gal/cairo/cairo_gal.cpp
+++ b/common/gal/cairo/cairo_gal.cpp
@@ -241,11 +241,15 @@ void CAIRO_GAL::DrawArc( const VECTOR2D& aCenterPoint, 
double aRadius, double aS
 {
 SWAP( aStartAngle, >, aEndAngle );
 
-cairo_new_sub_path( currentContext );
-cairo_arc( currentContext, aCenterPoint.x, aCenterPoint.y, aRadius, 
aStartAngle, aEndAngle );
-
-if( isFillEnabled )
+if( isFillEnabled ) // Draw the filled area of the shape, before 
drawing the outline itself
 {
+double pen_size = GetLineWidth();
+auto fgcolor = GetStrokeColor();
+SetStrokeColor( GetFillColor() );
+
+SetLineWidth( 0 );
+cairo_new_sub_path( currentContext );
+cairo_arc( currentContext, aCenterPoint.x, aCenterPoint.y, aRadius, 
aStartAngle, aEndAngle );
 VECTOR2D startPoint( cos( aStartAngle ) * aRadius + aCenterPoint.x,
  sin( aStartAngle ) * aRadius + aCenterPoint.y );
 VECTOR2D endPoint( cos( aEndAngle ) * aRadius + aCenterPoint.x,
@@ -255,8 +259,13 @@ void CAIRO_GAL::DrawArc( const VECTOR2D& aCenterPoint, 
double aRadius, double aS
 cairo_line_to( currentContext, startPoint.x, startPoint.y );
 cairo_line_to( currentContext, endPoint.x, endPoint.y );
 cairo_close_path( currentContext );
+flushPath();
+SetLineWidth( pen_size );
+SetStrokeColor( fgcolor );
 }
 
+cairo_new_sub_path( currentContext );
+cairo_arc( currentContext, aCenterPoint.x, aCenterPoint.y, aRadius, 
aStartAngle, aEndAngle );
 flushPath();
 
 isElementAdded = true;
diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp
index 875f8d00a..fe579b8f4 100644
--- a/eeschema/sch_painter.cpp
+++ b/eeschema/sch_painter.cpp
@@ -358,9 +358,6 @@ void SCH_PAINTER::draw( LIB_ARC *aArc, int aLayer )
 VECTOR2D pos = mapCoords( aArc->GetPosition() );
 
 m_gal->DrawArc( pos, aArc->GetRadius(), sa, ea);
-/*m_gal->SetStrokeColor(COLOR4D(1.0,0,0,1.0));
-m_gal->DrawLine ( pos - VECTOR2D(20, 20), pos + VECTOR2D(20, 20));
-m_gal->DrawLine ( pos - VECTOR2D(-20, 20), pos + VECTOR2D(-20, 20));*/
 }
 
 
@@ -1215,9 +1212,20 @@ void SCH_PAINTER::draw( SCH_SHEET *aSheet, int aLayer )
 VECTOR2D size = aSheet->GetSize();
 
 m_gal->SetStrokeColor( m_schSettings.GetLayerColor( 

Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-16 Thread Thomas Pointhuber
Hi,

Navigating in the schematic hierarchy seems to be broken a bit. Just
zoom in a bit and enter/leave sub-sheets. You will see the cursor
warping to some weird position, and the sheet is not displayed as whole.
In my case often a blank area appears after entering/leaving the
sub-sheet. The expected behaviour would be no mouse warping and showing
the full schematic sheet.

Application: eeschema
Version: (6.0.0-rc1-dev-470-ge78a310f4), debug build
Libraries:
wxWidgets 3.1.1
libcurl/7.61.1 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2
(+libidn2/2.0.4) nghttp2/1.32.0
Platform: Linux 4.18.7-arch1-1-ARCH x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.1.1 (wchar_t,wx containers) GTK+ 2.24
Boost: 1.67.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.61.1
Compiler: Clang 6.0.1 with C++ ABI 1002

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_WXPYTHON=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON



signature.asc
Description: OpenPGP digital signature
___
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] GAL canvas strategy - testers needed!

2018-09-16 Thread Jeff Young
I pushed a bunch of CLangTidy fixes and a fix for the grid colour.

Cheers,
Jeff.


> On 16 Sep 2018, at 08:40, mdoes...@xs4all.nl wrote:
> 
> I've given the GAL version a test-drive. Here are some issues I noted.
> I guess most of it is because the black background was not tested before.
> 
> 1. Grid color always black. (Not visible on black background) 
> 2. Hierarchical sheet color always white.
> 3. When using another background color (for example 1,1,1) the sheet
>   color is correct after zooming.  When moving the mouse the sheet color
>   gradually changes to white. Sometimes a double picture is shown, see
>   attachment. The background color was 1,1,1 for this schematic.
> 


___
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] GAL canvas strategy - testers needed!

2018-09-16 Thread mdoesbur
I've given the GAL version a test-drive. Here are some issues I noted.
I guess most of it is because the black background was not tested before.

1. Grid color always black. (Not visible on black background) 
2. Hierarchical sheet color always white.
3. When using another background color (for example 1,1,1) the sheet
   color is correct after zooming.  When moving the mouse the sheet color
   gradually changes to white. Sometimes a double picture is shown, see
   attachment. The background color was 1,1,1 for this schematic.


kicad_gal.png
Description: Binary data
___
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] GAL canvas strategy - testers needed!

2018-09-15 Thread Jeff Young
I pushed JP’s changes.

(I’m pretty sure I fixed the add-item-undo issue yesterday.)

Cheers,
Jeff.

> On 15 Sep 2018, at 15:24, jp charras  wrote:
> 
> Le 14/09/2018 à 11:30, Jeff Young a écrit :
>> I pushed JP’s patches.
>> 
>> What’s our plan for getting this branch merged to master?
>> 
>> Cheers,
>> Jeff.
>> 
> 
> 
> Hi Jeff,
> Attached 3 other patches.
> The patch 0003 is mandatory, because it fixes a Eeschema crash at startup.
> 
> Currently there a blocking issue in Eeschema:
> If a text or a symbol is added, the action cannot be undone.
> If it is undone, the new item is still on screen, and any added item
> (for instance adding a wire) crashes Eeschema.
> 
> An annoying but not blocking issue is the fact Scrollbars are no longer
> displayed in GAL mode (I don't know why).
> 
> There are in Eeschema a few (minor?) cosmetic problems:
> In Symbol selector the preview canvas shows artifacts in OpenGL mode.
> Symbols with filled arcs have outlines drawn as pie, not arc in Cairo mode.
> 
> -- 
> Jean-Pierre CHARRAS
> <0001-Make-SYMBOL_PREVIEW_WIDGET-working-and-using-the-can.patch><0002-Eeschema-Cairo-backend-fix-a-minor-but-annoying-rend.patch><0003-Eeschema-fix-a-crash-at-startup-in-OpenGL-engine-whe.patch>___
> 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


Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-15 Thread jp charras
Le 14/09/2018 à 11:30, Jeff Young a écrit :
> I pushed JP’s patches.
> 
> What’s our plan for getting this branch merged to master?
> 
> Cheers,
> Jeff.
> 


Hi Jeff,
Attached 3 other patches.
The patch 0003 is mandatory, because it fixes a Eeschema crash at startup.

Currently there a blocking issue in Eeschema:
If a text or a symbol is added, the action cannot be undone.
If it is undone, the new item is still on screen, and any added item
(for instance adding a wire) crashes Eeschema.

An annoying but not blocking issue is the fact Scrollbars are no longer
displayed in GAL mode (I don't know why).

There are in Eeschema a few (minor?) cosmetic problems:
In Symbol selector the preview canvas shows artifacts in OpenGL mode.
Symbols with filled arcs have outlines drawn as pie, not arc in Cairo mode.

-- 
Jean-Pierre CHARRAS
From 5c24f435428b35d8c64acbbcd00ccbdcc0b1b0f5 Mon Sep 17 00:00:00 2001
From: jean-pierre charras 
Date: Sat, 15 Sep 2018 09:00:13 +0200
Subject: [PATCH 1/3] Make SYMBOL_PREVIEW_WIDGET working, and using the canvas
 type of the caller. Fix an issue with F3 zoom key in libedit.

---
 common/gal/opengl/opengl_gal.cpp |  46 +--
 common/legacy_gal/eda_draw_frame.cpp |   8 +-
 eeschema/dialogs/dialog_choose_component.cpp |   3 +-
 eeschema/dialogs/dialog_rescue_each.cpp  |  37 ++-
 eeschema/dialogs/dialog_rescue_each_base.cpp |  22 +-
 eeschema/dialogs/dialog_rescue_each_base.fbp | 280 +++
 eeschema/dialogs/dialog_rescue_each_base.h   |  10 +-
 eeschema/project_rescue.cpp  |   2 +-
 eeschema/sch_base_frame.cpp  |  12 +-
 eeschema/sch_painter.cpp |   4 +-
 eeschema/widgets/symbol_preview_widget.cpp   |  31 +-
 eeschema/widgets/symbol_preview_widget.h |   6 +-
 12 files changed, 207 insertions(+), 254 deletions(-)

diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp
index 62c567d52..1ba0747c7 100644
--- a/common/gal/opengl/opengl_gal.cpp
+++ b/common/gal/opengl/opengl_gal.cpp
@@ -653,29 +653,6 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, 
double aRadius, double a
 Save();
 currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0 );
 
-if( isStrokeEnabled )
-{
-currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, 
strokeColor.a );
-
-VECTOR2D p( cos( aStartAngle ) * aRadius, sin( aStartAngle ) * aRadius 
);
-double alpha;
-
-for( alpha = aStartAngle + alphaIncrement; alpha <= aEndAngle; alpha 
+= alphaIncrement )
-{
-VECTOR2D p_next( cos( alpha ) * aRadius, sin( alpha ) * aRadius );
-DrawLine( p, p_next );
-
-p = p_next;
-}
-
-// Draw the last missing part
-if( alpha != aEndAngle )
-{
-VECTOR2D p_last( cos( aEndAngle ) * aRadius, sin( aEndAngle ) * 
aRadius );
-DrawLine( p, p_last );
-}
-}
-
 if( isFillEnabled )
 {
 double alpha;
@@ -701,6 +678,29 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, 
double aRadius, double a
 currentManager->Vertex( endPoint.x,endPoint.y, 0.0 );
 }
 
+if( isStrokeEnabled )
+{
+currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, 
strokeColor.a );
+
+VECTOR2D p( cos( aStartAngle ) * aRadius, sin( aStartAngle ) * aRadius 
);
+double alpha;
+
+for( alpha = aStartAngle + alphaIncrement; alpha <= aEndAngle; alpha 
+= alphaIncrement )
+{
+VECTOR2D p_next( cos( alpha ) * aRadius, sin( alpha ) * aRadius );
+DrawLine( p, p_next );
+
+p = p_next;
+}
+
+// Draw the last missing part
+if( alpha != aEndAngle )
+{
+VECTOR2D p_last( cos( aEndAngle ) * aRadius, sin( aEndAngle ) * 
aRadius );
+DrawLine( p, p_last );
+}
+}
+
 Restore();
 }
 
diff --git a/common/legacy_gal/eda_draw_frame.cpp 
b/common/legacy_gal/eda_draw_frame.cpp
index 9d8718c52..2a39567a7 100644
--- a/common/legacy_gal/eda_draw_frame.cpp
+++ b/common/legacy_gal/eda_draw_frame.cpp
@@ -1468,14 +1468,11 @@ void EDA_DRAW_FRAME::SetNextZoomAndRedraw( const 
wxPoint& aCenterPoint, bool aWa
 if( idx >= (int)zoomList.size() )
 return;
 
-VECTOR2D cpos = GetGalCanvas()->GetViewControls()->GetCursorPosition();
-wxPoint center( (int)cpos.x, (int)cpos.y );
-
 if( m_zoomSelectBox )
 m_zoomSelectBox->SetSelection( idx );
 
 if( GetScreen()->SetZoom( GetScreen()->m_ZoomList[idx] ) )
-RedrawScreen( aCenterPoint, true );
+RedrawScreen( aCenterPoint, aWarpPointer );
 }
 
 
@@ -1497,9 +1494,6 @@ void EDA_DRAW_FRAME::SetPreviousZoomAndRedraw( const 
wxPoint& aCenterPoint, bool
 if( idx < 0 )
 return;
 
-VECTOR2D cpos = GetGalCanvas()->GetViewControls()->GetCursorPosition();
-wxPoint center( (int)cpos.x, (int)cpos.y );
-
 if( 

Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-14 Thread John Beard
Hi,

Quick bug report on fb748be43 (eeschema GAL HEAD) on Linux: Undoing a
global label doesn't refresh.

1) Make a global label
2) Undo it
3) Nothing happens
4) Refresh (F3): Label disappears

Otherwise, looking quite slick.

Cheers,

John
On Fri, Sep 14, 2018 at 10:30 AM Jeff Young  wrote:
>
> I pushed JP’s patches.
>
> What’s our plan for getting this branch merged to master?
>
> Cheers,
> Jeff.
>
>
> > On 14 Sep 2018, at 10:15, jp charras  wrote:
> >
> > Le 12/09/2018 à 17:01, Jeff Young a écrit :
> >> I just pushed a fix for a segfault while routing.  
> >> (https://bugs.launchpad.net/kicad/+bug/1792037)
> >>
> >> Cheers,
> >> Jeff.
> >
> > Hi Jeff,
> >
> > Attached 2 other patches for Eeschema GAL.
> >
> > The first allows switching between Cairo and Opengl.
> > The second fixes Zoom issues (with hotkeys and popup menu).
> >
> > I am seeing an other annoying issue: the scroll bars are not shown in
> > Gal Canvas (both in Eeschema and Pcbnew), but I have no idea why they
> > are not displayed (although they are displayed in the pad properties
> > dialog).
> >
> > Perhaps a GAL guru could have a look into this issue.
> >
> > I also saw a few minor other issues, depending on the selected canvas.
> >
> > Cheers,
> >
> > --
> > Jean-Pierre CHARRAS
> > <0001-add-option-to-switch-between-opengl-and-cairo-in-ees.patch><0002-Fix-zoom-issues-in-Eeschema-F1-to-F4-and-popup-zoom-.patch>___
> > 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

___
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] GAL canvas strategy - testers needed!

2018-09-14 Thread Jeff Young
I pushed JP’s patches.

What’s our plan for getting this branch merged to master?

Cheers,
Jeff.


> On 14 Sep 2018, at 10:15, jp charras  wrote:
> 
> Le 12/09/2018 à 17:01, Jeff Young a écrit :
>> I just pushed a fix for a segfault while routing.  
>> (https://bugs.launchpad.net/kicad/+bug/1792037)
>> 
>> Cheers,
>> Jeff.
> 
> Hi Jeff,
> 
> Attached 2 other patches for Eeschema GAL.
> 
> The first allows switching between Cairo and Opengl.
> The second fixes Zoom issues (with hotkeys and popup menu).
> 
> I am seeing an other annoying issue: the scroll bars are not shown in
> Gal Canvas (both in Eeschema and Pcbnew), but I have no idea why they
> are not displayed (although they are displayed in the pad properties
> dialog).
> 
> Perhaps a GAL guru could have a look into this issue.
> 
> I also saw a few minor other issues, depending on the selected canvas.
> 
> Cheers,
> 
> -- 
> Jean-Pierre CHARRAS
> <0001-add-option-to-switch-between-opengl-and-cairo-in-ees.patch><0002-Fix-zoom-issues-in-Eeschema-F1-to-F4-and-popup-zoom-.patch>___
> 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


Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-14 Thread jp charras
Le 12/09/2018 à 17:01, Jeff Young a écrit :
> I just pushed a fix for a segfault while routing.  
> (https://bugs.launchpad.net/kicad/+bug/1792037)
> 
> Cheers,
> Jeff.

Hi Jeff,

Attached 2 other patches for Eeschema GAL.

The first allows switching between Cairo and Opengl.
The second fixes Zoom issues (with hotkeys and popup menu).

I am seeing an other annoying issue: the scroll bars are not shown in
Gal Canvas (both in Eeschema and Pcbnew), but I have no idea why they
are not displayed (although they are displayed in the pad properties
dialog).

Perhaps a GAL guru could have a look into this issue.

I also saw a few minor other issues, depending on the selected canvas.

Cheers,

-- 
Jean-Pierre CHARRAS
From 57be4f24ad098a97fdbff920d43ca6f3b7fb6c64 Mon Sep 17 00:00:00 2001
From: jean-pierre charras 
Date: Mon, 10 Sep 2018 15:37:28 +0200
Subject: [PATCH 1/2] add option to switch between opengl and cairo in eeschema
 (step 1)

---
 common/draw_panel_gal.cpp|  4 +--
 common/gal/cairo/cairo_gal.cpp   |  8 +++--
 common/gal/opengl/opengl_gal.cpp | 11 --
 common/legacy_gal/eda_draw_frame.cpp | 11 +++---
 eeschema/hotkeys.cpp | 19 +-
 eeschema/hotkeys.h   |  4 ++-
 eeschema/menubar.cpp | 14 
 eeschema/onrightclick.cpp|  2 +-
 eeschema/sch_base_frame.cpp  | 54 +---
 eeschema/sch_base_frame.h| 12 +++
 eeschema/sch_draw_panel.cpp  | 20 +++
 eeschema/sch_edit_frame.cpp  |  5 +++
 eeschema/sch_preview_panel.cpp   |  8 +++--
 include/class_draw_panel_gal.h   |  4 +--
 include/draw_frame.h |  5 +--
 pcbnew/pcb_draw_panel_gal.cpp|  1 +
 16 files changed, 147 insertions(+), 35 deletions(-)

diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp
index 9d49ff26c..adb45b0db 100644
--- a/common/draw_panel_gal.cpp
+++ b/common/draw_panel_gal.cpp
@@ -360,7 +360,7 @@ bool EDA_DRAW_PANEL_GAL::SwitchBackend( GAL_TYPE aGalType )
 break;
 
 default:
-assert( false );
+wxASSERT( false );
 // warn about unhandled GAL canvas type, but continue with the 
fallback option
 
 case GAL_TYPE_NONE:
@@ -383,7 +383,7 @@ bool EDA_DRAW_PANEL_GAL::SwitchBackend( GAL_TYPE aGalType )
 // from the defaults
 m_options.NotifyChanged();
 
-assert( new_gal );
+wxASSERT( new_gal );
 delete m_gal;
 m_gal = new_gal;
 
diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp
index b5f3e4f67..d9834b469 100644
--- a/common/gal/cairo/cairo_gal.cpp
+++ b/common/gal/cairo/cairo_gal.cpp
@@ -351,7 +351,11 @@ void CAIRO_GAL::DrawCurve( const VECTOR2D& aStartPoint, 
const VECTOR2D& aControl
 void CAIRO_GAL::DrawBitmap( const BITMAP_BASE& aBitmap )
 {
 int ppi = aBitmap.GetPPI();
-double worldIU_per_mm = 1/(worldUnitLength/2.54)/1000;
+// We have to calculate the pixel size in users units to draw the image.
+// worldUnitLength is the user unit in GAL unit value
+// (GAL unit = 0.1 inch in nanometer = 2.54/1000 in mm).
+// worldUnitLength * 1000 / 2.54 is the user unit in mm
+double worldIU_per_mm = 1/( worldUnitLength / 0.00254 );
 double pix_size_iu =  worldIU_per_mm * ( 25.4 / ppi );
 int w = aBitmap.GetSizePixels().x;
 int h = aBitmap.GetSizePixels().y;
@@ -1202,5 +1206,5 @@ unsigned int CAIRO_GAL::getNewGroupNumber()
 
 void CAIRO_GAL::EnableDepthTest( bool aEnabled )
 {
-
+
 }
diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp
index 409047bca..62c567d52 100644
--- a/common/gal/opengl/opengl_gal.cpp
+++ b/common/gal/opengl/opengl_gal.cpp
@@ -1001,8 +1001,15 @@ void OPENGL_GAL::DrawBitmap( const BITMAP_BASE& aBitmap )
 {
 int ppi = aBitmap.GetPPI();
 
-double w = (double) aBitmap.GetSizePixels().x / (double) ppi / 
worldUnitLength * 10.0; // no idea where the factor 10 comes from...
-double h = (double) aBitmap.GetSizePixels().y / (double) ppi / 
worldUnitLength * 10.0;
+// We have to calculate the pixel size in users units to draw the image.
+// worldUnitLength is the user unit in GAL unit value
+// (GAL unit = 2.54/1e9 in meter).
+// worldUnitLength * 1000 / 2.54 is the user unit in mm
+double worldIU_per_mm = 1.0 / ( worldUnitLength / 0.00254 );
+double pix_size_iu = worldIU_per_mm * ( 25.4 / ppi );
+
+double w = (double) aBitmap.GetSizePixels().x * pix_size_iu;
+double h = (double) aBitmap.GetSizePixels().y * pix_size_iu;
 
 auto xform = currentManager->GetTransformation();
 
diff --git a/common/legacy_gal/eda_draw_frame.cpp 
b/common/legacy_gal/eda_draw_frame.cpp
index fa4fbb50f..75fd45c7e 100644
--- a/common/legacy_gal/eda_draw_frame.cpp
+++ b/common/legacy_gal/eda_draw_frame.cpp
@@ -221,16 +221,13 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* 
aParent,
 m_FramePos.x   = m_FramePos.y = 0;
 

Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-12 Thread Jeff Young
I just pushed a fix for a segfault while routing.  
(https://bugs.launchpad.net/kicad/+bug/1792037)

Cheers,
Jeff.


> On 10 Sep 2018, at 14:47, Jeff Young  wrote:
> 
> Another commit set up.  JP’s crash-on-startup, sheet pin refresh bugs, 
> Clarify Selection minimisation, and OpenGL canvas default on OSX.
> 
>> On 10 Sep 2018, at 14:23, Simon Richter  wrote:
>> 
>> Hi,
>> 
>> On 10.09.2018 01:22, Jeff Young wrote:
>> 
>>> New set of commits pushed.
>> 
>> Built as #135:
>> 
>> 
>> http://downloads.kicad-pcb.org/windows/testing/patched/kicad-patched-135-4a57541b7-x86_64.exe
>> 
>>  Simon
>> 
>> ___
>> 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


___
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] GAL canvas strategy - testers needed!

2018-09-10 Thread Jeff Young
Another commit set up.  JP’s crash-on-startup, sheet pin refresh bugs, Clarify 
Selection minimisation, and OpenGL canvas default on OSX.

> On 10 Sep 2018, at 14:23, Simon Richter  wrote:
> 
> Hi,
> 
> On 10.09.2018 01:22, Jeff Young wrote:
> 
>> New set of commits pushed.
> 
> Built as #135:
> 
> 
> http://downloads.kicad-pcb.org/windows/testing/patched/kicad-patched-135-4a57541b7-x86_64.exe
> 
>   Simon
> 
> ___
> 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


Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-10 Thread Simon Richter
Hi,

On 10.09.2018 01:22, Jeff Young wrote:

> New set of commits pushed.

Built as #135:


http://downloads.kicad-pcb.org/windows/testing/patched/kicad-patched-135-4a57541b7-x86_64.exe

   Simon



signature.asc
Description: OpenPGP digital signature
___
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] GAL canvas strategy - testers needed!

2018-09-10 Thread jp charras
Le 10/09/2018 à 01:22, Jeff Young a écrit :
> New set of commits pushed.
> 
> Includes a bunch of fixes for refresh of various operations, fixes to
> dangling symbol drawing for power symbols, removal of unused and
> redundant stuff, and clamping of no-connect and junction sizes to a
> multiple of the wire size (along with user-definable junction sizes).
> 
> Cheers,
> Jeff.

Hi Jeff,

Attached, a small patch that fixes a crash when starting Eeschema.

For some reason, on my install, the crash happens only if compiled in
debug mode, and could be platform specific.

FYI, I am trying to add GAL switch option (OpenGL/Cairo only) in Eeschema.

-- 
Jean-Pierre CHARRAS
>From 61db6c666b54160f6de1d77bc3307a4ee6187457 Mon Sep 17 00:00:00 2001
From: jean-pierre charras 
Date: Mon, 10 Sep 2018 11:16:59 +0200
Subject: [PATCH] Eeschema: Fix a crash at start in Debug mode

---
 common/draw_panel_gal.cpp | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp
index 66047b165..9d49ff26c 100644
--- a/common/draw_panel_gal.cpp
+++ b/common/draw_panel_gal.cpp
@@ -218,8 +218,12 @@ void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent )
 {
 wxSize clientSize = GetClientSize();
 m_gal->ResizeScreen( clientSize.x, clientSize.y );
-m_view->MarkTargetDirty( KIGFX::TARGET_CACHED );
-m_view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
+
+if( m_view )
+{
+m_view->MarkTargetDirty( KIGFX::TARGET_CACHED );
+m_view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
+}
 }
 
 
@@ -476,7 +480,7 @@ void EDA_DRAW_PANEL_GAL::SetCurrentCursor( int aCursor )
 {
 m_currentCursor = wxCURSOR_ARROW;
 }
-
+
 SetCursor( (wxStockCursor) m_currentCursor );
 }
 
@@ -484,4 +488,3 @@ void EDA_DRAW_PANEL_GAL::SetDefaultCursor()
 {
 SetCurrentCursor( m_defaultCursor );
 }
-
\ No newline at end of file
-- 
2.17.0.windows.1

___
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] GAL canvas strategy - testers needed!

2018-09-09 Thread Jeff Young
New set of commits pushed.

Includes a bunch of fixes for refresh of various operations, fixes to dangling 
symbol drawing for power symbols, removal of unused and redundant stuff, and 
clamping of no-connect and junction sizes to a multiple of the wire size (along 
with user-definable junction sizes).

Cheers,
Jeff.


> On 8 Sep 2018, at 22:52, Andrey Kuznetsov  wrote:
> 
> Thank you Simon, I was hoping for this! Please continue to release as it goes 
> so those of use who cannot compile on our own can feedback!
> 
> On Sat, Sep 8, 2018 at 6:56 AM, Simon Richter  > wrote:
> Hi,
> 
> in case anyone needs Windows binaries to test,
> 
> 
> http://downloads.kicad-pcb.org/windows/testing/patched/kicad-patched-134-d3c82b0b5-x86_64.exe
>  
> 
> 
> is the state of the GAL branch of yesterday evening.
> 
> The branch also compiles fine on MSVC.
> 
>Simon
> 
> ___
> 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 
> 
> 
> 
> 
> -- 
> Remember The Past, Live The Present, Change The Future
> Those who look only to the past or the present are certain to miss the future 
> [JFK]
> 
> kandre...@gmail.com 
> Live Long and Prosper,
> Andrey
> ___
> 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


Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-08 Thread Andrey Kuznetsov
Thank you Simon, I was hoping for this! Please continue to release as it
goes so those of use who cannot compile on our own can feedback!

On Sat, Sep 8, 2018 at 6:56 AM, Simon Richter 
wrote:

> Hi,
>
> in case anyone needs Windows binaries to test,
>
> http://downloads.kicad-pcb.org/windows/testing/patched/
> kicad-patched-134-d3c82b0b5-x86_64.exe
>
> is the state of the GAL branch of yesterday evening.
>
> The branch also compiles fine on MSVC.
>
>Simon
>
> ___
> 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
>



-- 
Remember The Past, Live The Present, Change The Future
Those who look only to the past or the present are certain to miss the
future [JFK]

kandre...@gmail.com
Live Long and Prosper,
Andrey
___
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] GAL canvas strategy - testers needed!

2018-09-08 Thread Jeff Young
I’ve pushed JP’s 2 patches along with fixes to:

1) cross probing
2) the drawing line segments assert
3) preference changes to panning, etc.

Cheers,
Jeff.

> On 8 Sep 2018, at 17:47, Jeff Young  wrote:
> 
> No worries JP, you got the fix up before I got around to the first one 
> anyway. ;)
> 
> Cheers,
> Jeff.
> 
> 
>> On 8 Sep 2018, at 17:41, jp charras > > wrote:
>> 
>> Le 08/09/2018 à 13:16, jp charras a écrit :
>>> Le 07/09/2018 à 23:50, Jeff Young a écrit :
 I pushed a few more bug fixes, an implementation of line styles (dashed,
 dotted, etc.) and a fix for the dragging-object (‘G’ hotkey) bug.
 
 Cheers,
 Jeff.
>>> 
>>> 
>>> Hi Jeff,
>>> Attached 2 patches.
>>> The first one fixes minor visibility issues.
>>> The second fixes issues relative to SCH_BITMAP display and edition.
>>> 
>>> Cheers,
>>> 
>> 
>> Sorry Jeff,
>> My second patch has a bug (creates a crash when right clicking on an
>> empty area, due to use of a null pointer in a debug message).
>> Attached, the new patch with the fix.
>> 
>> Really Sorry.
>> 
>> -- 
>> Jean-Pierre CHARRAS
>> <0002-Fix-SCH_BITMAP-handling-in-gal_fixed.patch>___
>> 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

___
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] GAL canvas strategy - testers needed!

2018-09-08 Thread Jeff Young
No worries JP, you got the fix up before I got around to the first one anyway. 
;)

Cheers,
Jeff.


> On 8 Sep 2018, at 17:41, jp charras  wrote:
> 
> Le 08/09/2018 à 13:16, jp charras a écrit :
>> Le 07/09/2018 à 23:50, Jeff Young a écrit :
>>> I pushed a few more bug fixes, an implementation of line styles (dashed,
>>> dotted, etc.) and a fix for the dragging-object (‘G’ hotkey) bug.
>>> 
>>> Cheers,
>>> Jeff.
>> 
>> 
>> Hi Jeff,
>> Attached 2 patches.
>> The first one fixes minor visibility issues.
>> The second fixes issues relative to SCH_BITMAP display and edition.
>> 
>> Cheers,
>> 
> 
> Sorry Jeff,
> My second patch has a bug (creates a crash when right clicking on an
> empty area, due to use of a null pointer in a debug message).
> Attached, the new patch with the fix.
> 
> Really Sorry.
> 
> -- 
> Jean-Pierre CHARRAS
> <0002-Fix-SCH_BITMAP-handling-in-gal_fixed.patch>___
> 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


Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-08 Thread jp charras
Le 08/09/2018 à 13:16, jp charras a écrit :
> Le 07/09/2018 à 23:50, Jeff Young a écrit :
>> I pushed a few more bug fixes, an implementation of line styles (dashed,
>> dotted, etc.) and a fix for the dragging-object (‘G’ hotkey) bug.
>>
>> Cheers,
>> Jeff.
> 
> 
> Hi Jeff,
> Attached 2 patches.
> The first one fixes minor visibility issues.
> The second fixes issues relative to SCH_BITMAP display and edition.
> 
> Cheers,
> 

Sorry Jeff,
My second patch has a bug (creates a crash when right clicking on an
empty area, due to use of a null pointer in a debug message).
Attached, the new patch with the fix.

Really Sorry.

-- 
Jean-Pierre CHARRAS
From 5b3665ed59820464938f2365b79161bd08347890 Mon Sep 17 00:00:00 2001
From: jean-pierre charras 
Date: Sat, 8 Sep 2018 13:12:41 +0200
Subject: [PATCH 2/2] Fix SCH_BITMAP handling in gal.

---
 eeschema/edit_bitmap.cpp |  1 +
 eeschema/onrightclick.cpp|  3 ++-
 eeschema/sch_bitmap.cpp  |  3 +--
 eeschema/sch_bitmap.h| 11 +++
 eeschema/sch_painter.cpp |  7 +++
 eeschema/schedit.cpp | 17 ++---
 eeschema/schematic_undo_redo.cpp |  4 
 7 files changed, 40 insertions(+), 6 deletions(-)

diff --git a/eeschema/edit_bitmap.cpp b/eeschema/edit_bitmap.cpp
index e5d04e8a6..fac6b5d0e 100644
--- a/eeschema/edit_bitmap.cpp
+++ b/eeschema/edit_bitmap.cpp
@@ -124,6 +124,7 @@ SCH_BITMAP* SCH_EDIT_FRAME::CreateNewImage( wxDC* aDC )
 return NULL;
 }
 
+image->SetFlags( IS_NEW | IS_MOVED );
 
 auto view = static_cast( m_canvas )->GetView();
 
diff --git a/eeschema/onrightclick.cpp b/eeschema/onrightclick.cpp
index fe72dd65a..39b44de45 100644
--- a/eeschema/onrightclick.cpp
+++ b/eeschema/onrightclick.cpp
@@ -142,7 +142,8 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& 
aPosition, wxMenu* PopMenu )
 bool actionCancelled = false;
 item = LocateAndShowItem( aPosition, SCH_COLLECTOR::AllItemsButPins, 
0,  );
 
-printf("Locateandshow %d %d item %p\n", aPosition.x, aPosition.y, item 
);
+printf("Locateandshow %d %d item %p type %d\n", aPosition.x, 
aPosition.y,
+item, item ? item->Type() : 0 ); fflush(0);
 
 // If the clarify item selection context menu is aborted, don't show 
the context menu.
 if( item == NULL && actionCancelled )
diff --git a/eeschema/sch_bitmap.cpp b/eeschema/sch_bitmap.cpp
index c9bb683fe..c74643928 100644
--- a/eeschema/sch_bitmap.cpp
+++ b/eeschema/sch_bitmap.cpp
@@ -128,8 +128,7 @@ void SCH_BITMAP::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, 
const wxPoint& aOffset
 GRSetDrawMode( aDC, aDrawMode );
 #endif
 
-//fixme-gal
-//m_image->DrawBitmap( aPanel, aDC, pos );
+m_image->DrawBitmap( aDC, pos );
 }
 else// draws bounding box only (used to move items)
 {
diff --git a/eeschema/sch_bitmap.h b/eeschema/sch_bitmap.h
index b318b8be4..8b2ea93db 100644
--- a/eeschema/sch_bitmap.h
+++ b/eeschema/sch_bitmap.h
@@ -84,6 +84,17 @@ public:
 return m_image->GetScalingFactor();
 }
 
+/**
+ * @return the m_Scale image "zoom" value
+ * m_Scale is an user dependant value, and is similar to a "zoom" value
+ *  m_Scale = 1.0 = original size of bitmap.
+ *  m_Scale < 1.0 = the bitmap is drawn smaller than its original size.
+ *  m_Scale > 1.0 = the bitmap is drawn bigger than its original size.
+ */
+double GetImageScale() const
+{
+return m_image->GetScale();
+}
 
 wxString GetClass() const override
 {
diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp
index 3b2428fb4..04f7e4632 100644
--- a/eeschema/sch_painter.cpp
+++ b/eeschema/sch_painter.cpp
@@ -1317,7 +1317,14 @@ void SCH_PAINTER::draw( SCH_BITMAP *aBitmap, int aLayer )
 {
 m_gal->Save();
 m_gal->Translate( aBitmap->GetPosition() );
+
+// When the image scale factor is not 1.0, we need to modify the actual
+// as the image scale factor is similar to a local zoom
+if( aBitmap->GetImageScale() != 1.0 )
+m_gal->Scale( VECTOR2D( aBitmap->GetImageScale(), 
aBitmap->GetImageScale() ) );
+
 m_gal->DrawBitmap( *aBitmap->GetImage() );
+
 m_gal->Restore();
 }
 
diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp
index ce7ab4aca..0f32d34fd 100644
--- a/eeschema/schedit.cpp
+++ b/eeschema/schedit.cpp
@@ -443,17 +443,18 @@ void SCH_EDIT_FRAME::OnMoveItem( wxCommandEvent& aEvent )
 case SCH_SHEET_PIN_T:
 case SCH_FIELD_T:
 case SCH_SHEET_T:
+case SCH_BITMAP_T:
 PrepareMoveItem( item, nullptr );
 break;
 
-case SCH_BITMAP_T:
+/*case SCH_BITMAP_T:
 // move an image is a special case:
 // we cannot undraw/redraw a bitmap just using our xor mode
 // the MoveImage function handle this undraw/redraw difficulty
 // By redrawing the full bounding box
-//MoveImage( (SCH_BITMAP*) item,  );
+MoveImage( (SCH_BITMAP*) item,  );
 

Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-08 Thread Simon Richter
Hi,

in case anyone needs Windows binaries to test,


http://downloads.kicad-pcb.org/windows/testing/patched/kicad-patched-134-d3c82b0b5-x86_64.exe

is the state of the GAL branch of yesterday evening.

The branch also compiles fine on MSVC.

   Simon

___
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] GAL canvas strategy - testers needed!

2018-09-08 Thread jp charras
Le 07/09/2018 à 23:50, Jeff Young a écrit :
> I pushed a few more bug fixes, an implementation of line styles (dashed,
> dotted, etc.) and a fix for the dragging-object (‘G’ hotkey) bug.
> 
> Cheers,
> Jeff.


Hi Jeff,
Attached 2 patches.
The first one fixes minor visibility issues.
The second fixes issues relative to SCH_BITMAP display and edition.

Cheers,

-- 
Jean-Pierre CHARRAS
From 7ed5964adf5e255ec85de99ace4708493a42d179 Mon Sep 17 00:00:00 2001
From: jean-pierre charras 
Date: Fri, 7 Sep 2018 18:13:20 +0200
Subject: [PATCH 1/2] Set the reight grid visibility at start. Display axis in
 libedit and viewlib.

---
 common/gal/opengl/opengl_gal.cpp| 4 ++--
 eeschema/libedit/lib_edit_frame.cpp | 2 ++
 eeschema/sch_edit_frame.cpp | 3 +++
 eeschema/viewlib_frame.cpp  | 4 +++-
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp
index 4ca422b75..409047bca 100644
--- a/common/gal/opengl/opengl_gal.cpp
+++ b/common/gal/opengl/opengl_gal.cpp
@@ -1000,7 +1000,7 @@ void OPENGL_GAL::DrawCurve( const VECTOR2D& aStartPoint, 
const VECTOR2D& aContro
 void OPENGL_GAL::DrawBitmap( const BITMAP_BASE& aBitmap )
 {
 int ppi = aBitmap.GetPPI();
-
+
 double w = (double) aBitmap.GetSizePixels().x / (double) ppi / 
worldUnitLength * 10.0; // no idea where the factor 10 comes from...
 double h = (double) aBitmap.GetSizePixels().y / (double) ppi / 
worldUnitLength * 10.0;
 
@@ -1009,7 +1009,7 @@ void OPENGL_GAL::DrawBitmap( const BITMAP_BASE& aBitmap )
 glm::vec4 v0 = xform * glm::vec4( -w/2, -h/2, 0.0, 0.0 );
 glm::vec4 v1 = xform * glm::vec4( w/2, h/2, 0.0, 0.0 );
 glm::vec4 trans = xform[3];
-
+
 auto id = bitmapCache->RequestBitmap(  );
 
 auto oldTarget = GetTarget();
diff --git a/eeschema/libedit/lib_edit_frame.cpp 
b/eeschema/libedit/lib_edit_frame.cpp
index f6dcc0f48..c64395de6 100644
--- a/eeschema/libedit/lib_edit_frame.cpp
+++ b/eeschema/libedit/lib_edit_frame.cpp
@@ -278,6 +278,8 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* 
aParent ) :
 SyncView();
 GetGalCanvas()->GetViewControls()->SetSnapping( true );
 GetGalCanvas()->GetView()->UseDrawPriority( true );
+GetGalCanvas()->GetGAL()->SetGridVisibility( IsGridVisible() );
+GetGalCanvas()->GetGAL()->SetAxesEnabled( true );
 }
 
 
diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp
index d6cd1d0eb..2bdcfb1f8 100644
--- a/eeschema/sch_edit_frame.cpp
+++ b/eeschema/sch_edit_frame.cpp
@@ -429,6 +429,9 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* 
aParent ):
 
 Zoom_Automatique( false );
 
+if( GetGalCanvas() )
+GetGalCanvas()->GetGAL()->SetGridVisibility( IsGridVisible() );
+
 // Net list generator
 DefaultExecFlags();
 
diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp
index c6abab4c0..4c3d35771 100644
--- a/eeschema/viewlib_frame.cpp
+++ b/eeschema/viewlib_frame.cpp
@@ -203,6 +203,8 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* 
aParent, FRAME_T aFrame
 
 SyncView();
 GetGalCanvas()->GetViewControls()->SetSnapping( true );
+GetGalCanvas()->GetGAL()->SetAxesEnabled( true );
+GetGalCanvas()->GetGAL()->SetGridVisibility( IsGridVisible() );
 }
 
 
@@ -760,6 +762,6 @@ const BOX2I LIB_VIEW_FRAME::GetDocumentExtents() const
 {
 EDA_RECT bbox = part->GetUnitBoundingBox( m_unit, m_convert );
 return BOX2I( bbox.GetOrigin(), VECTOR2I( bbox.GetWidth(), 
bbox.GetHeight() ) );
-
+
 }
 }
\ No newline at end of file
-- 
2.17.0.windows.1

From 817603ca89c03c727a03c32b4c7a32a247cb3c90 Mon Sep 17 00:00:00 2001
From: jean-pierre charras 
Date: Sat, 8 Sep 2018 13:12:41 +0200
Subject: [PATCH 2/2] Fix SCH_BITMAP handling in gal.

---
 eeschema/edit_bitmap.cpp |  1 +
 eeschema/onrightclick.cpp|  2 +-
 eeschema/sch_bitmap.cpp  |  3 +--
 eeschema/sch_bitmap.h| 11 +++
 eeschema/sch_painter.cpp |  7 +++
 eeschema/schedit.cpp | 17 ++---
 eeschema/schematic_undo_redo.cpp |  4 
 7 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/eeschema/edit_bitmap.cpp b/eeschema/edit_bitmap.cpp
index e5d04e8a6..fac6b5d0e 100644
--- a/eeschema/edit_bitmap.cpp
+++ b/eeschema/edit_bitmap.cpp
@@ -124,6 +124,7 @@ SCH_BITMAP* SCH_EDIT_FRAME::CreateNewImage( wxDC* aDC )
 return NULL;
 }
 
+image->SetFlags( IS_NEW | IS_MOVED );
 
 auto view = static_cast( m_canvas )->GetView();
 
diff --git a/eeschema/onrightclick.cpp b/eeschema/onrightclick.cpp
index fe72dd65a..5785c2688 100644
--- a/eeschema/onrightclick.cpp
+++ b/eeschema/onrightclick.cpp
@@ -142,7 +142,7 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& 
aPosition, wxMenu* PopMenu )
 bool actionCancelled = false;
 item = LocateAndShowItem( aPosition, SCH_COLLECTOR::AllItemsButPins, 
0,  );
 
-printf("Locateandshow %d 

Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-07 Thread Dan Green
> -Click+dragging on a symbol starts a selection rectangle instead of moving 
> the symbol

Scratch this one. It's the same behavoir as in the current nightly. 


> On Sep 7, 2018, at 5:36 PM, dann  wrote:
> 
> Nice!
> 
> Here’s a few things I found on OSX 10.13.6, Retina iMac:
> 
> -Click+dragging on a symbol starts a selection rectangle instead of moving 
> the symbol
> 
> -With the schematic and PCB windows open at the same time, clicking a 
> footprint on the PCB makes the schematic jump and zoom, but it doesn’t always 
> put the selected component in view. Often the entire schematic is zoomed out 
> and/or panned off-screen. It seems to be inconsistent, that is, it doesn’t 
> always pan and zoom to the same place when clicking on the same component.
> 
> -Likewise, I have to double-click a symbol in eeschema to have it highlight 
> in the PCB window. This opens up the Symbol Properties dialog box as well. 
> Single clicking seems to have no effect.
> 
> -When changing the anti-aliasing mode, immediately after closing the 
> Preferences window, the schematic pane goes solid blue for a moment. The 
> toolbars stay normal, just the center pane turns blue.
> 
> -Toggling the “Use touchpad to Pan” setting has no effect until Eeschema is 
> closed and re-opened.
> 
> -Junctions are drawn underneath components. Not sure if this is good or bad, 
> just different from the non-GAL version.
> 
> -I get this Debug Alert when I use the wire tool. It happens whenever I end a 
> wire segment by double-clicking:
> 
> /Users/design/src/kicad-mac-builder/build/kicad/src/kicad/common/dlist.cpp(104):
>  assert "item->GetList() == " failed in append().
> Call stack:
> [00] SCH_SCREEN::Append(DLIST&) sch_screen.h:16
> [01] SCH_BASE_FRAME::AddToScreen(DLIST&)sch_base_frame.cpp:57
> [02] SCH_EDIT_FRAME::EndSegment() bus-wire-junction.cpp:32
> [03] SCH_EDIT_FRAME::OnLeftDClick(wxDC*, wxPoint const&)  
> onleftclick.cpp:45
> [04] SCH_DRAW_PANEL::OnMouseEvent(wxMouseEvent&)  sch_draw_panel.cpp:30
> [05] wxEvtHandler::SearchDynamicEventTable(wxEvent&) 
> [06] wxEvtHandler::ProcessEventLocally(wxEvent&) 
> [07] wxEvtHandler::ProcessEvent(wxEvent&)
> [08] wxEvtHandler::ProcessPendingEvents()
> [09] wxAppConsoleBase::ProcessPendingEvents() 
> [10] wxCFEventLoop::OSXCommonModeObserverCallBack(__CFRunLoopObserver*, int, 
> void*) 
> [11] __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ 
> [12] __CFRunLoopDoObservers  
> [13] __CFRunLoopRun  
> [14] CFRunLoopRunSpecific
> [15] RunCurrentEventLoopInMode   
> [16] ReceiveNextEventCommon  
> [17] _BlockUntilNextEventMatchingListInModeWithFilter 
> [18] _DPSNextEvent   
> [19] -[NSApplication(NSEvent) 
> _nextEventMatchingEventMask:untilDate:inMode:dequeue:] 
> [20] -[NSApplication run]
> Do you want to stop the program?
> You can also choose [Cancel] to suppress further warnings.
> 
> Hope that helps! Really happy to see this come along
> 
> Cheers,
> Dan
> 
> 
>> On Sep 6, 2018, at 8:57 AM, Tomasz Wlostowski  
>> wrote:
>> 
>> On 06/09/18 17:37, Jeff Young wrote:
>>> Hi Tom,
>>> 
>>> I have committed the completion of the block rotate and mirror fixes 
>>> (including for LibEdit).
>> 
>> Hi Jeff,
>> 
>> Thanks, I played with eeschema for a short while and I really appreciate
>> all the work you have done!
>> 
>> Dear devs (non-devs too ;-) - whoever is interested in testing this
>> branch, please compile this and send the feedback here:
>> 
>> https://git.launchpad.net/~jeyjey/kicad/log/?h=tom-eeschema-gal-aug27
>> 
>> 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
> 


___
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] GAL canvas strategy - testers needed!

2018-09-07 Thread dann
Nice!

Here’s a few things I found on OSX 10.13.6, Retina iMac:

-Click+dragging on a symbol starts a selection rectangle instead of moving the 
symbol

-With the schematic and PCB windows open at the same time, clicking a footprint 
on the PCB makes the schematic jump and zoom, but it doesn’t always put the 
selected component in view. Often the entire schematic is zoomed out and/or 
panned off-screen. It seems to be inconsistent, that is, it doesn’t always pan 
and zoom to the same place when clicking on the same component.

-Likewise, I have to double-click a symbol in eeschema to have it highlight in 
the PCB window. This opens up the Symbol Properties dialog box as well. Single 
clicking seems to have no effect.

-When changing the anti-aliasing mode, immediately after closing the 
Preferences window, the schematic pane goes solid blue for a moment. The 
toolbars stay normal, just the center pane turns blue.

-Toggling the “Use touchpad to Pan” setting has no effect until Eeschema is 
closed and re-opened.

-Junctions are drawn underneath components. Not sure if this is good or bad, 
just different from the non-GAL version.

-I get this Debug Alert when I use the wire tool. It happens whenever I end a 
wire segment by double-clicking:

/Users/design/src/kicad-mac-builder/build/kicad/src/kicad/common/dlist.cpp(104):
 assert "item->GetList() == " failed in append().
Call stack:
[00] SCH_SCREEN::Append(DLIST&)   sch_screen.h:16
[01] SCH_BASE_FRAME::AddToScreen(DLIST&)  sch_base_frame.cpp:57
[02] SCH_EDIT_FRAME::EndSegment()   bus-wire-junction.cpp:32
[03] SCH_EDIT_FRAME::OnLeftDClick(wxDC*, wxPoint const&)
onleftclick.cpp:45
[04] SCH_DRAW_PANEL::OnMouseEvent(wxMouseEvent&)sch_draw_panel.cpp:30
[05] wxEvtHandler::SearchDynamicEventTable(wxEvent&) 
[06] wxEvtHandler::ProcessEventLocally(wxEvent&) 
[07] wxEvtHandler::ProcessEvent(wxEvent&)
[08] wxEvtHandler::ProcessPendingEvents()
[09] wxAppConsoleBase::ProcessPendingEvents() 
[10] wxCFEventLoop::OSXCommonModeObserverCallBack(__CFRunLoopObserver*, int, 
void*) 
[11] __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ 
[12] __CFRunLoopDoObservers  
[13] __CFRunLoopRun  
[14] CFRunLoopRunSpecific
[15] RunCurrentEventLoopInMode   
[16] ReceiveNextEventCommon  
[17] _BlockUntilNextEventMatchingListInModeWithFilter 
[18] _DPSNextEvent   
[19] -[NSApplication(NSEvent) 
_nextEventMatchingEventMask:untilDate:inMode:dequeue:] 
[20] -[NSApplication run]
Do you want to stop the program?
You can also choose [Cancel] to suppress further warnings.

Hope that helps! Really happy to see this come along

Cheers,
Dan


> On Sep 6, 2018, at 8:57 AM, Tomasz Wlostowski  
> wrote:
> 
> On 06/09/18 17:37, Jeff Young wrote:
>> Hi Tom,
>> 
>> I have committed the completion of the block rotate and mirror fixes 
>> (including for LibEdit).
> 
> Hi Jeff,
> 
> Thanks, I played with eeschema for a short while and I really appreciate
> all the work you have done!
> 
> Dear devs (non-devs too ;-) - whoever is interested in testing this
> branch, please compile this and send the feedback here:
> 
> https://git.launchpad.net/~jeyjey/kicad/log/?h=tom-eeschema-gal-aug27
> 
> 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


___
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] GAL canvas strategy - testers needed!

2018-09-07 Thread Jeff Young
I pushed a few more bug fixes, an implementation of line styles (dashed, 
dotted, etc.) and a fix for the dragging-object (‘G’ hotkey) bug.

Cheers,
Jeff.


> On 7 Sep 2018, at 16:20, Wayne Stambaugh  wrote:
> 
> Some feedback from what I've seen so far which can be observed in the
> attached screen capture.
> 
> The wire line thickness changes when zooming which makes for a rather
> interesting visual effect.
> 
> When dragging an object ('G' hotkey), the object is displaced off the
> display.
> 
> The scrollbars do not appear to work at all.
> 
> This was built with wxWidgets using gtk2.  I also tested a build with
> gtk3 and didn't see much of a difference.  I am using Debian testing
> with the nvidia graphics drivers.  I will continue testing and keep you
> posted if I find any other issues.
> 
> Cheers,
> 
> Wayne
> 
> On 09/06/2018 12:18 PM, jp charras wrote:
>> Le 06/09/2018 à 17:57, Tomasz Wlostowski a écrit :
>>> On 06/09/18 17:37, Jeff Young wrote:
 Hi Tom,
 
 I have committed the completion of the block rotate and mirror fixes 
 (including for LibEdit).
>>> 
>>> Hi Jeff,
>>> 
>>> Thanks, I played with eeschema for a short while and I really appreciate
>>> all the work you have done!
>>> 
>>> Dear devs (non-devs too ;-) - whoever is interested in testing this
>>> branch, please compile this and send the feedback here:
>>> 
>>> https://git.launchpad.net/~jeyjey/kicad/log/?h=tom-eeschema-gal-aug27
>>> 
>>> Cheers,
>>> Tom
>> 
>> Hi Jeff,
>> 
>> Attached, a small patch that fixes a few minor compil warnings, and
>> re-enable calls to draw symbols items in wxDC canvas for printing
>> purpose, making printing working again.
>> 
>> Thanks to you, Jeff and Tomasz, for all your hard work on GAL for Eeschema.
>> 
>> 
>> 
>> 
>> ___
>> 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 
> 
___
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] GAL canvas strategy - testers needed!

2018-09-07 Thread Wayne Stambaugh
Some feedback from what I've seen so far which can be observed in the
attached screen capture.

The wire line thickness changes when zooming which makes for a rather
interesting visual effect.

When dragging an object ('G' hotkey), the object is displaced off the
display.

The scrollbars do not appear to work at all.

This was built with wxWidgets using gtk2.  I also tested a build with
gtk3 and didn't see much of a difference.  I am using Debian testing
with the nvidia graphics drivers.  I will continue testing and keep you
posted if I find any other issues.

Cheers,

Wayne

On 09/06/2018 12:18 PM, jp charras wrote:
> Le 06/09/2018 à 17:57, Tomasz Wlostowski a écrit :
>> On 06/09/18 17:37, Jeff Young wrote:
>>> Hi Tom,
>>>
>>> I have committed the completion of the block rotate and mirror fixes 
>>> (including for LibEdit).
>>
>> Hi Jeff,
>>
>> Thanks, I played with eeschema for a short while and I really appreciate
>> all the work you have done!
>>
>> Dear devs (non-devs too ;-) - whoever is interested in testing this
>> branch, please compile this and send the feedback here:
>>
>> https://git.launchpad.net/~jeyjey/kicad/log/?h=tom-eeschema-gal-aug27
>>
>> Cheers,
>> Tom
> 
> Hi Jeff,
> 
> Attached, a small patch that fixes a few minor compil warnings, and
> re-enable calls to draw symbols items in wxDC canvas for printing
> purpose, making printing working again.
> 
> Thanks to you, Jeff and Tomasz, for all your hard work on GAL for Eeschema.
> 
> 
> 
> 
> ___
> 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


Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-07 Thread Jeff Young
Hi all,

An update on a few of the issues Marcus reported:

1) Hooked up the “Always show cursor” preference so it isn’t shown when no tool 
is active.

2) Fixed the outline issue.  We *were* drawing the outline centred, it’s just 
that we were filling it *after* stroking so that the fill covered up half of 
the outline.

Note that the second fix will *also* change the rectangle stroke/fill behaviour 
for Pcbnew.  However, I’m not sure we use separate colour stroke/fills there so 
it might not matter (and the fix brings rectangles in line with other shapes 
which were already don’t correctly).

Both fixes pushed (along with JP’s most recent patch).

Cheers,
Jeff.


___
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] GAL canvas strategy - testers needed!

2018-09-07 Thread Vesa Solonen
Aimylios kirjoitti 07.09.2018 klo 09:37:

> "Supersampling (2x)" is useable at higher zoom levels. At lower zoom
> levels, the thickness of lines is not displayed uniformly, which I find
> somewhat irritating. But I guess I'll just have to get used to that.

You don't have to. Someone(tm) just have to implement pixel grid fitting
to push the scaling error to the gaps instead of line widths... I
wouldn't be worried too much this early. I believe Intel integrated GPU
is to blame for the performance issues with SS. WxDC is usually very
fast on these GPUs though.

-Vesa

___
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] GAL canvas strategy - testers needed!

2018-09-07 Thread jp charras
Le 07/09/2018 à 00:31, Jeff Young a écrit :
>>
<...>

Hi Jeff,

Attached a small patch that fixes some cosmetic issues (incorrect color
of some items).


-- 
Jean-Pierre CHARRAS
From d493d9d463f7ac1f3ad22488d3fd5428778f2a3d Mon Sep 17 00:00:00 2001
From: jean-pierre charras 
Date: Fri, 7 Sep 2018 09:15:22 +0200
Subject: [PATCH] sch_painter.cpp: fix a few incorrect color selections Fix
 also dangling symbol thickness of bus entries

---
 eeschema/sch_painter.cpp | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp
index 070e26bf0..853cc689d 100644
--- a/eeschema/sch_painter.cpp
+++ b/eeschema/sch_painter.cpp
@@ -171,7 +171,7 @@ bool SCH_PAINTER::Draw( const VIEW_ITEM *aItem, int aLayer )
 
 m_gal->StrokeText( wxT("Test"), VECTOR2D(0, 0), 0.0 );
 */
-   switch(item->Type())
+   switch( item->Type() )
{
HANDLE_ITEM(LIB_ALIAS_T, LIB_ALIAS);
HANDLE_ITEM(LIB_PART_T, LIB_PART);
@@ -920,9 +920,10 @@ void SCH_PAINTER::draw( SCH_TEXT *aText, int aLayer )
 
 switch( aText->Type() )
 {
-case SCH_HIERARCHICAL_LABEL_T: color = m_schSettings.GetLayerColor( 
LAYER_SHEETLABEL ); break;
-case SCH_GLOBAL_LABEL_T:   color = m_schSettings.GetLayerColor( 
LAYER_GLOBLABEL );  break;
-default:   color = m_schSettings.GetLayerColor( 
LAYER_NOTES );  break;
+case SCH_HIERARCHICAL_LABEL_T:  color = m_schSettings.GetLayerColor( 
LAYER_SHEETLABEL ); break;
+case SCH_GLOBAL_LABEL_T:color = m_schSettings.GetLayerColor( 
LAYER_GLOBLABEL );  break;
+case SCH_LABEL_T:   color = m_schSettings.GetLayerColor( 
LAYER_LOCLABEL );   break;
+default:color = m_schSettings.GetLayerColor( 
LAYER_NOTES );  break;
 }
 
 if( !aText->IsVisible() )
@@ -1240,7 +1241,9 @@ void SCH_PAINTER::draw( SCH_NO_CONNECT *aNC, int aLayer )
 
 void SCH_PAINTER::draw( SCH_BUS_ENTRY_BASE *aEntry, int aLayer )
 {
-COLOR4D color = m_schSettings.GetLayerColor( LAYER_BUS );
+COLOR4D color = aEntry->Type() == SCH_BUS_BUS_ENTRY_T ?
+m_schSettings.GetLayerColor( LAYER_BUS )
+: m_schSettings.GetLayerColor( LAYER_WIRE 
);
 
 if( aEntry->IsMoving() )
 color = selectedBrightening( color );
@@ -1255,7 +1258,8 @@ void SCH_PAINTER::draw( SCH_BUS_ENTRY_BASE *aEntry, int 
aLayer )
 
 m_gal->DrawLine( pos, endPos );
 
-m_gal->SetStrokeColor( m_schSettings.GetLayerColor( LAYER_BUS ) );
+// Draw dangling symbols:
+m_gal->SetLineWidth ( 1.0 );
 
 if( aEntry->IsDanglingStart() )
 m_gal->DrawCircle( pos, TARGET_BUSENTRY_RADIUS );
-- 
2.17.0.windows.1

___
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] GAL canvas strategy - testers needed!

2018-09-07 Thread Aimylios

Hi Jeff,

Am 06.09.2018 um 23:08 schrieb Jeff Young:


Supersampling (4x) is still slow on my 3-year-old Mac Powerbook.  But 
Supersampling (2x) renders quickly and is nearly impossible to tell apart on my 
Mac Retina display.  Does 2x not render well on your ThinkPad?


"Supersampling (2x)" is useable at higher zoom levels. At lower zoom 
levels, the thickness of lines is not displayed uniformly, which I find 
somewhat irritating. But I guess I'll just have to get used to that.



Am 07.09.2018 um 00:31 schrieb Jeff Young:

 >> I observed some minor issues (tested on Linux with GTK3):

- buses and graphic lines always have the same colour as wires

I just pushed a fix for this.


The color issue is now fixed, but the style of graphic lines is not 
displayed correctly.



- right mouse click doesn't always work (it seems to me that the context menu 
appears and almost immediately disappears in about 50% of cases)


Hmm… GTK-specific?  (I haven’t seen this at all on OSX.)


To test this, I've compiled your branch with both GTK2 (version 2.24) 
and GTK3 (version 3.22) and it is indeed GTK3-specific.
I thought the whole idea of this work was to make KiCad compatible to 
GTK3, but it seems to me that GTK2 is still the preferred choice.



- the "small crosshair" is rather big (80 pixels instead of 24 pixels)


This is the same size we’ve used in Pcbnew for quite some time.


That is correct, but Pcbnew (GAL) has an option to not always show the 
crosshair, which makes it less annoying. Could such an option be added 
to Eeschema as well? The checkbox is already there, but it has no effect.



- the crosshair is never centered at the position of the mouse cursor in Y 
direction (X direction is OK, see attached screenshot)


The cross-hair jumps to the grid; the mouse pointer does not.  Is this what 
you’re seeing, or is there an offset even when the pointer is on the grid?


Yes, there is always an offset in Y direction, independent of the 
position within the grid. The screenshot shows how close the mouse 
cursor can get to the center of the crosshair. If I move the mouse up 
even one pixel, the crosshair jumps to the next grid point.
But it turns out that this issue is GTK3-specific as well, my GTK2 build 
is not affected.



- adding bitmaps to the schematic does not work (the file selector appears 
again when trying to place the bitmap that was selected before)
- editing bitmaps (mirror, rotate, etc.) doesn't work as expected, the 
transformation is only applied after closing and reopening Eeschema


I’ll look into these next.  (BTW: I hooked up the zoom refresh tool to rebuild 
the graphics state, so you might try it on things like mirror, rotate, etc.)


Zooming doesn't help. But I was talking about the "Image Editor" 
(accessible via "e" hotkey") that has no effect until Eeschema is 
restarted. The usual hotkey actions for rotation, mirroring, etc. do 
work correctly.


Best regards,
Marcus

___
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] GAL canvas strategy - testers needed!

2018-09-06 Thread Jeff Young
> 
> Hi Tom, hi Jeff,
> 
> I observed some minor issues (tested on Linux with GTK3):
> - buses and graphic lines always have the same colour as wires

I just pushed a fix for this.

> - symbol outlines/pins are not drawn correctly (see attached screenshot)

It appears that we draw the body line from the body dimension out, rather than 
centered on the body dimension.  That being said, I’m not sure what we used to 
do, nor what is considered “correct”, so I’ll leave this one for Tom.

> - zoom level is not limited (22 was a reasonable upper value for Eeschema in 
> my opinion)
> - right mouse click doesn't always work (it seems to me that the context menu 
> appears and almost immediately disappears in about 50% of cases)

Hmm… GTK-specific?  (I haven’t seen this at all on OSX.)

> - the "small crosshair" is rather big (80 pixels instead of 24 pixels)

This is the same size we’ve used in Pcbnew for quite some time.

> - the crosshair is never centered at the position of the mouse cursor in Y 
> direction (X direction is OK, see attached screenshot)

The cross-hair jumps to the grid; the mouse pointer does not.  Is this what 
you’re seeing, or is there an offset even when the pointer is on the grid?

> - global and hierarchical labels only consist of text

Fix pushed.

> - adding bitmaps to the schematic does not work (the file selector appears 
> again when trying to place the bitmap that was selected before)
> - editing bitmaps (mirror, rotate, etc.) doesn't work as expected, the 
> transformation is only applied after closing and reopening Eeschema

I’ll look into these next.  (BTW: I hooked up the zoom refresh tool to rebuild 
the graphics state, so you might try it on things like mirror, rotate, etc.)

Cheers,
Jeff.


> 
> Also, I need to set the graphics acceleration to "Supersampling (4x)" to get 
> an acceptable display quality, which unfortunately causes Eeschema to be 
> rather slow. But that may just be an issue with my old computer (Thinkpad 
> T420s).
> 
> Other than that, the new implementation looks very promising!
> 
> Best regards,
> Marcus
> 


___
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] GAL canvas strategy - testers needed!

2018-09-06 Thread Jeff Young
Hi Folks,

I pushed a commit that overhauls the block logic to allow rotation and 
mirroring on the fly with blocks.

Cheers,
Jeff.


> On 6 Sep 2018, at 22:08, Jeff Young  wrote:
> 
> Hi Marcus,
> 
> Supersampling (4x) is still slow on my 3-year-old Mac Powerbook.  But 
> Supersampling (2x) renders quickly and is nearly impossible to tell apart on 
> my Mac Retina display.  Does 2x not render well on your ThinkPad?
> 
> I’ll look into the other stuff tomorrow or over the weekend.
> 
> Cheers,
> Jeff.
> 
> 
>> On 6 Sep 2018, at 20:59, Aimylios  wrote:
>> 
>> Am 06.09.2018 um 17:57 schrieb Tomasz Wlostowski:
>>> On 06/09/18 17:37, Jeff Young wrote:
 Hi Tom,
 
 I have committed the completion of the block rotate and mirror fixes 
 (including for LibEdit).
>>> Hi Jeff,
>>> Thanks, I played with eeschema for a short while and I really appreciate
>>> all the work you have done!
>>> Dear devs (non-devs too ;-) - whoever is interested in testing this
>>> branch, please compile this and send the feedback here:
>>> https://git.launchpad.net/~jeyjey/kicad/log/?h=tom-eeschema-gal-aug27
>>> Cheers,
>>> Tom
>> 
>> Hi Tom, hi Jeff,
>> 
>> I observed some minor issues (tested on Linux with GTK3):
>> - buses and graphic lines always have the same colour as wires
>> - symbol outlines/pins are not drawn correctly (see attached screenshot)
>> - zoom level is not limited (22 was a reasonable upper value for Eeschema in 
>> my opinion)
>> - right mouse click doesn't always work (it seems to me that the context 
>> menu appears and almost immediately disappears in about 50% of cases)
>> - the "small crosshair" is rather big (80 pixels instead of 24 pixels)
>> - the crosshair is never centered at the position of the mouse cursor in Y 
>> direction (X direction is OK, see attached screenshot)
>> - global and hierarchical labels only consist of text
>> - adding bitmaps to the schematic does not work (the file selector appears 
>> again when trying to place the bitmap that was selected before)
>> - editing bitmaps (mirror, rotate, etc.) doesn't work as expected, the 
>> transformation is only applied after closing and reopening Eeschema
>> 
>> Also, I need to set the graphics acceleration to "Supersampling (4x)" to get 
>> an acceptable display quality, which unfortunately causes Eeschema to be 
>> rather slow. But that may just be an issue with my old computer (Thinkpad 
>> T420s).
>> 
>> Other than that, the new implementation looks very promising!
>> 
>> Best regards,
>> Marcus
>> 
> 
> 
> ___
> 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


Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-06 Thread Jeff Young
Hi Marcus,

Supersampling (4x) is still slow on my 3-year-old Mac Powerbook.  But 
Supersampling (2x) renders quickly and is nearly impossible to tell apart on my 
Mac Retina display.  Does 2x not render well on your ThinkPad?

I’ll look into the other stuff tomorrow or over the weekend.

Cheers,
Jeff.


> On 6 Sep 2018, at 20:59, Aimylios  wrote:
> 
> Am 06.09.2018 um 17:57 schrieb Tomasz Wlostowski:
>> On 06/09/18 17:37, Jeff Young wrote:
>>> Hi Tom,
>>> 
>>> I have committed the completion of the block rotate and mirror fixes 
>>> (including for LibEdit).
>> Hi Jeff,
>> Thanks, I played with eeschema for a short while and I really appreciate
>> all the work you have done!
>> Dear devs (non-devs too ;-) - whoever is interested in testing this
>> branch, please compile this and send the feedback here:
>> https://git.launchpad.net/~jeyjey/kicad/log/?h=tom-eeschema-gal-aug27
>> Cheers,
>> Tom
> 
> Hi Tom, hi Jeff,
> 
> I observed some minor issues (tested on Linux with GTK3):
> - buses and graphic lines always have the same colour as wires
> - symbol outlines/pins are not drawn correctly (see attached screenshot)
> - zoom level is not limited (22 was a reasonable upper value for Eeschema in 
> my opinion)
> - right mouse click doesn't always work (it seems to me that the context menu 
> appears and almost immediately disappears in about 50% of cases)
> - the "small crosshair" is rather big (80 pixels instead of 24 pixels)
> - the crosshair is never centered at the position of the mouse cursor in Y 
> direction (X direction is OK, see attached screenshot)
> - global and hierarchical labels only consist of text
> - adding bitmaps to the schematic does not work (the file selector appears 
> again when trying to place the bitmap that was selected before)
> - editing bitmaps (mirror, rotate, etc.) doesn't work as expected, the 
> transformation is only applied after closing and reopening Eeschema
> 
> Also, I need to set the graphics acceleration to "Supersampling (4x)" to get 
> an acceptable display quality, which unfortunately causes Eeschema to be 
> rather slow. But that may just be an issue with my old computer (Thinkpad 
> T420s).
> 
> Other than that, the new implementation looks very promising!
> 
> Best regards,
> Marcus
> 


___
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] GAL canvas strategy - testers needed!

2018-09-06 Thread Aimylios

Am 06.09.2018 um 17:57 schrieb Tomasz Wlostowski:

On 06/09/18 17:37, Jeff Young wrote:

Hi Tom,

I have committed the completion of the block rotate and mirror fixes (including 
for LibEdit).


Hi Jeff,

Thanks, I played with eeschema for a short while and I really appreciate
all the work you have done!

Dear devs (non-devs too ;-) - whoever is interested in testing this
branch, please compile this and send the feedback here:

https://git.launchpad.net/~jeyjey/kicad/log/?h=tom-eeschema-gal-aug27

Cheers,
Tom


Hi Tom, hi Jeff,

I observed some minor issues (tested on Linux with GTK3):
- buses and graphic lines always have the same colour as wires
- symbol outlines/pins are not drawn correctly (see attached screenshot)
- zoom level is not limited (22 was a reasonable upper value for 
Eeschema in my opinion)
- right mouse click doesn't always work (it seems to me that the context 
menu appears and almost immediately disappears in about 50% of cases)

- the "small crosshair" is rather big (80 pixels instead of 24 pixels)
- the crosshair is never centered at the position of the mouse cursor in 
Y direction (X direction is OK, see attached screenshot)

- global and hierarchical labels only consist of text
- adding bitmaps to the schematic does not work (the file selector 
appears again when trying to place the bitmap that was selected before)
- editing bitmaps (mirror, rotate, etc.) doesn't work as expected, the 
transformation is only applied after closing and reopening Eeschema


Also, I need to set the graphics acceleration to "Supersampling (4x)" to 
get an acceptable display quality, which unfortunately causes Eeschema 
to be rather slow. But that may just be an issue with my old computer 
(Thinkpad T420s).


Other than that, the new implementation looks very promising!

Best regards,
Marcus
___
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] GAL canvas strategy - testers needed!

2018-09-06 Thread jp charras
Le 06/09/2018 à 18:34, Tomasz Wlostowski a écrit :
> On 06/09/18 18:18, jp charras wrote:
>> Attached, a small patch that fixes a few minor compil warnings, and
>> re-enable calls to draw symbols items in wxDC canvas for printing
>> purpose, making printing working again.
> 
> Hi JP,
> 
> Orson's close to finishing cairo printing support - so very soon we'll
> have new printing engine in eeschema.
> 
> Tom
> 

Hi Tom (and Orson)

This is really a good news. When printing boards with Pcbnew:
- On Linux, the wxDC used in printing is really broken on GTK3 (this is
not really a news: I never see printing on Linux working well)
- But on Windows, postscript drivers (including PDF drivers) are also
broken: tracks are printed with a small thickness (thickness=0 ?)
- I do not know what happens on OSX.

Perhaps the new printing engine will fix these issues on Windows (in Pcbnew)

-- 
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] GAL canvas strategy - testers needed!

2018-09-06 Thread Seth Hillbrand
I'll have time tonight to look into the pan and send a patch.

In the meantime, here's a video showing the disappearing symbols:
https://youtu.be/Ve8CTQb5U5k

I also just noted that the zoom Z value on the status bar doesn't always
update while zooming.

-S

Am Do., 6. Sep. 2018 um 10:05 Uhr schrieb Jeff Young :

> Hi Seth,
>
> Yeah, Tom reported the first one, but I’ve no mouse so I’m gladly
> accepting patches… ;)
>
> For (2) do you mean when dragging or when scrolling?   If you mean when
> scrolling then what did you do just before scrolling?  (The scrolling
> issues I’ve seen so far are usually because the previous operation added
> the item to the view before moving it and it doesn’t get moved in the RTree
> for some reason.)
>
> Cheers,
> Jeff.
>
>
> On 6 Sep 2018, at 17:50, Seth Hillbrand  wrote:
>
> Couple quick notes:
>
> 1) Middle mouse pan resets zoom level to 0.72
> 2) Modules disappear when ~90 of the module is off the canvas
>
>
> Really looks great so far!  Thanks guys!
>
> Am Do., 6. Sep. 2018 um 09:41 Uhr schrieb Jeff Young :
>
>> Thanks, JP.  I pushed your patch.
>>
>> > On 6 Sep 2018, at 17:18, jp charras  wrote:
>> >
>> > Le 06/09/2018 à 17:57, Tomasz Wlostowski a écrit :
>> >> On 06/09/18 17:37, Jeff Young wrote:
>> >>> Hi Tom,
>> >>>
>> >>> I have committed the completion of the block rotate and mirror fixes
>> (including for LibEdit).
>> >>
>> >> Hi Jeff,
>> >>
>> >> Thanks, I played with eeschema for a short while and I really
>> appreciate
>> >> all the work you have done!
>> >>
>> >> Dear devs (non-devs too ;-) - whoever is interested in testing this
>> >> branch, please compile this and send the feedback here:
>> >>
>> >> https://git.launchpad.net/~jeyjey/kicad/log/?h=tom-eeschema-gal-aug27
>> >>
>> >> Cheers,
>> >> Tom
>> >
>> > Hi Jeff,
>> >
>> > Attached, a small patch that fixes a few minor compil warnings, and
>> > re-enable calls to draw symbols items in wxDC canvas for printing
>> > purpose, making printing working again.
>> >
>> > Thanks to you, Jeff and Tomasz, for all your hard work on GAL for
>> Eeschema.
>> >
>> >
>> > --
>> > Jean-Pierre CHARRAS
>> >
>> <0001-minor-compil-warnings-and-drawings-fix.patch>___
>> > 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
>>
>
>
___
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] GAL canvas strategy - testers needed!

2018-09-06 Thread Jeff Young
Hi Seth,

Yeah, Tom reported the first one, but I’ve no mouse so I’m gladly accepting 
patches… ;)

For (2) do you mean when dragging or when scrolling?   If you mean when 
scrolling then what did you do just before scrolling?  (The scrolling issues 
I’ve seen so far are usually because the previous operation added the item to 
the view before moving it and it doesn’t get moved in the RTree for some 
reason.)

Cheers,
Jeff.


> On 6 Sep 2018, at 17:50, Seth Hillbrand  wrote:
> 
> Couple quick notes:
> 
> 1) Middle mouse pan resets zoom level to 0.72
> 2) Modules disappear when ~90 of the module is off the canvas
> 
> 
> Really looks great so far!  Thanks guys!
> 
> Am Do., 6. Sep. 2018 um 09:41 Uhr schrieb Jeff Young  >:
> Thanks, JP.  I pushed your patch.
> 
> > On 6 Sep 2018, at 17:18, jp charras  > > wrote:
> > 
> > Le 06/09/2018 à 17:57, Tomasz Wlostowski a écrit :
> >> On 06/09/18 17:37, Jeff Young wrote:
> >>> Hi Tom,
> >>> 
> >>> I have committed the completion of the block rotate and mirror fixes 
> >>> (including for LibEdit).
> >> 
> >> Hi Jeff,
> >> 
> >> Thanks, I played with eeschema for a short while and I really appreciate
> >> all the work you have done!
> >> 
> >> Dear devs (non-devs too ;-) - whoever is interested in testing this
> >> branch, please compile this and send the feedback here:
> >> 
> >> https://git.launchpad.net/~jeyjey/kicad/log/?h=tom-eeschema-gal-aug27 
> >> 
> >> 
> >> Cheers,
> >> Tom
> > 
> > Hi Jeff,
> > 
> > Attached, a small patch that fixes a few minor compil warnings, and
> > re-enable calls to draw symbols items in wxDC canvas for printing
> > purpose, making printing working again.
> > 
> > Thanks to you, Jeff and Tomasz, for all your hard work on GAL for Eeschema.
> > 
> > 
> > -- 
> > Jean-Pierre CHARRAS
> > <0001-minor-compil-warnings-and-drawings-fix.patch>___
> > 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 
> 

___
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] GAL canvas strategy - testers needed!

2018-09-06 Thread Seth Hillbrand
Couple quick notes:

1) Middle mouse pan resets zoom level to 0.72
2) Modules disappear when ~90 of the module is off the canvas


Really looks great so far!  Thanks guys!

Am Do., 6. Sep. 2018 um 09:41 Uhr schrieb Jeff Young :

> Thanks, JP.  I pushed your patch.
>
> > On 6 Sep 2018, at 17:18, jp charras  wrote:
> >
> > Le 06/09/2018 à 17:57, Tomasz Wlostowski a écrit :
> >> On 06/09/18 17:37, Jeff Young wrote:
> >>> Hi Tom,
> >>>
> >>> I have committed the completion of the block rotate and mirror fixes
> (including for LibEdit).
> >>
> >> Hi Jeff,
> >>
> >> Thanks, I played with eeschema for a short while and I really appreciate
> >> all the work you have done!
> >>
> >> Dear devs (non-devs too ;-) - whoever is interested in testing this
> >> branch, please compile this and send the feedback here:
> >>
> >> https://git.launchpad.net/~jeyjey/kicad/log/?h=tom-eeschema-gal-aug27
> >>
> >> Cheers,
> >> Tom
> >
> > Hi Jeff,
> >
> > Attached, a small patch that fixes a few minor compil warnings, and
> > re-enable calls to draw symbols items in wxDC canvas for printing
> > purpose, making printing working again.
> >
> > Thanks to you, Jeff and Tomasz, for all your hard work on GAL for
> Eeschema.
> >
> >
> > --
> > Jean-Pierre CHARRAS
> >
> <0001-minor-compil-warnings-and-drawings-fix.patch>___
> > 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
>
___
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] GAL canvas strategy - testers needed!

2018-09-06 Thread Jeff Young
Thanks, JP.  I pushed your patch.

> On 6 Sep 2018, at 17:18, jp charras  wrote:
> 
> Le 06/09/2018 à 17:57, Tomasz Wlostowski a écrit :
>> On 06/09/18 17:37, Jeff Young wrote:
>>> Hi Tom,
>>> 
>>> I have committed the completion of the block rotate and mirror fixes 
>>> (including for LibEdit).
>> 
>> Hi Jeff,
>> 
>> Thanks, I played with eeschema for a short while and I really appreciate
>> all the work you have done!
>> 
>> Dear devs (non-devs too ;-) - whoever is interested in testing this
>> branch, please compile this and send the feedback here:
>> 
>> https://git.launchpad.net/~jeyjey/kicad/log/?h=tom-eeschema-gal-aug27
>> 
>> Cheers,
>> Tom
> 
> Hi Jeff,
> 
> Attached, a small patch that fixes a few minor compil warnings, and
> re-enable calls to draw symbols items in wxDC canvas for printing
> purpose, making printing working again.
> 
> Thanks to you, Jeff and Tomasz, for all your hard work on GAL for Eeschema.
> 
> 
> -- 
> Jean-Pierre CHARRAS
> <0001-minor-compil-warnings-and-drawings-fix.patch>___
> 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


Re: [Kicad-developers] GAL canvas strategy - testers needed!

2018-09-06 Thread Tomasz Wlostowski
On 06/09/18 18:18, jp charras wrote:
> Attached, a small patch that fixes a few minor compil warnings, and
> re-enable calls to draw symbols items in wxDC canvas for printing
> purpose, making printing working again.

Hi JP,

Orson's close to finishing cairo printing support - so very soon we'll
have new printing engine in eeschema.

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] GAL canvas strategy - testers needed!

2018-09-06 Thread jp charras
Le 06/09/2018 à 17:57, Tomasz Wlostowski a écrit :
> On 06/09/18 17:37, Jeff Young wrote:
>> Hi Tom,
>>
>> I have committed the completion of the block rotate and mirror fixes 
>> (including for LibEdit).
> 
> Hi Jeff,
> 
> Thanks, I played with eeschema for a short while and I really appreciate
> all the work you have done!
> 
> Dear devs (non-devs too ;-) - whoever is interested in testing this
> branch, please compile this and send the feedback here:
> 
> https://git.launchpad.net/~jeyjey/kicad/log/?h=tom-eeschema-gal-aug27
> 
> Cheers,
> Tom

Hi Jeff,

Attached, a small patch that fixes a few minor compil warnings, and
re-enable calls to draw symbols items in wxDC canvas for printing
purpose, making printing working again.

Thanks to you, Jeff and Tomasz, for all your hard work on GAL for Eeschema.


-- 
Jean-Pierre CHARRAS
From dd692c0ce100a7481638d13acbf58f5d3e318912 Mon Sep 17 00:00:00 2001
From: jean-pierre charras 
Date: Thu, 6 Sep 2018 17:55:37 +0200
Subject: [PATCH] minor compil warnings and drawings fix

---
 eeschema/class_libentry.cpp | 5 ++---
 eeschema/lib_draw_item.cpp  | 2 +-
 eeschema/sch_painter.cpp| 2 +-
 pcbnew/pcb_painter.h| 2 +-
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/eeschema/class_libentry.cpp b/eeschema/class_libentry.cpp
index 0135448ba..373fef81f 100644
--- a/eeschema/class_libentry.cpp
+++ b/eeschema/class_libentry.cpp
@@ -342,7 +342,6 @@ void LIB_PART::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDc, 
const wxPoint& aOffset,
 int aMulti, int aConvert, const PART_DRAW_OPTIONS& aOpts )
 {
 BASE_SCREEN*   screen = aPanel ? aPanel->GetScreen() : NULL;
-
 GRSetDrawMode( aDc, aOpts.draw_mode );
 
 /* draw background for filled items using background option
@@ -410,7 +409,7 @@ void LIB_PART::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDc, 
const wxPoint& aOffset,
 
 if( drawItem.Type() == LIB_FIELD_T )
 {
-LIB_FIELD& field = dynamic_cast( drawItem );
+LIB_FIELD& field = static_cast( drawItem );
 
 if( field.IsVisible() && !aOpts.draw_visible_fields )
 continue;
@@ -421,7 +420,7 @@ void LIB_PART::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDc, 
const wxPoint& aOffset,
 
 if( drawItem.Type() == LIB_PIN_T )
 {
-LIB_PIN& pin = dynamic_cast( drawItem );
+LIB_PIN& pin = static_cast( drawItem );
 
 uintptr_t flags = 0;
 if( aOpts.show_pin_text )
diff --git a/eeschema/lib_draw_item.cpp b/eeschema/lib_draw_item.cpp
index 96f164472..806ece92b 100644
--- a/eeschema/lib_draw_item.cpp
+++ b/eeschema/lib_draw_item.cpp
@@ -146,10 +146,10 @@ void LIB_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
 m_Fill = fillMode;
 }
 else
+#endif
 {
 drawGraphic( aPanel, aDC, aOffset, aColor, aDrawMode, aData, 
aTransform );
 }
-#endif
 }
 
 
diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp
index 233456456..23c443e65 100644
--- a/eeschema/sch_painter.cpp
+++ b/eeschema/sch_painter.cpp
@@ -674,7 +674,7 @@ void SCH_PAINTER::draw( LIB_PIN *aPin, int aLayer, bool 
isDangling, bool isMovin
 // Four locations around a pin where text can be drawn
 enum { INSIDE = 0, OUTSIDE, ABOVE, BELOW };
 int size[4] = { 0, 0, 0, 0 };
-int thickness[4];
+int thickness[4] = { numLineWidth, numLineWidth, numLineWidth, 
numLineWidth };
 COLOR4D colour[4];
 wxString text[4];
 
diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h
index c1df40a07..48ad17eba 100644
--- a/pcbnew/pcb_painter.h
+++ b/pcbnew/pcb_painter.h
@@ -136,7 +136,7 @@ public:
 m_sketchBoardGfx = aEnabled;
 }
 
-inline bool IsBackgroundDark() const
+inline bool IsBackgroundDark() const override
 {
 auto luma = m_layerColors[ LAYER_PCB_BACKGROUND ].GetBrightness();
 
-- 
2.17.0.windows.1

___
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] GAL canvas strategy - testers needed!

2018-09-06 Thread Tomasz Wlostowski
On 06/09/18 17:37, Jeff Young wrote:
> Hi Tom,
> 
> I have committed the completion of the block rotate and mirror fixes 
> (including for LibEdit).

Hi Jeff,

Thanks, I played with eeschema for a short while and I really appreciate
all the work you have done!

Dear devs (non-devs too ;-) - whoever is interested in testing this
branch, please compile this and send the feedback here:

https://git.launchpad.net/~jeyjey/kicad/log/?h=tom-eeschema-gal-aug27

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