← Back to team overview

kicad-developers team mailing list archive

Re: PATCH: partial fix to bug 1255937

 

Le 09/02/2014 20:55, Cirilo Bernardo a écrit :
> ----- Original Message -----
> 
>> From: jp charras <jp.charras@xxxxxxxxxx>
>> To: kicad-developers@xxxxxxxxxxxxxxxxxxx; cirilo_bernardo@xxxxxxxxx
>> Cc: 
>> Sent: Monday, February 10, 2014 3:19 AM
>> Subject: Re: [Kicad-developers] PATCH: partial fix to bug 1255937
>>
>> Le 09/02/2014 09:06, Cirilo Bernardo a écrit :
>>
>>>  The attached patch is a partial fix to bug 1255937.
>>>
>>>  Symptom: Pad outlines (arcs) in the back silk and mask are rendered 
>> incorrectly
>>>  (arc drawn in wrong direction) when a mirrored image is printed.
>>>
>>>  This patch works by checking the Device Origin and if the Y coordinate is 
>> not
>>>  0 it is assumed that the X axis is reversed. I would appreciate any 
>> comments
>>>  on this proposed solution; I don't know the code well enough to know if 
>> it is
>>>  possible to have a non-zero Y origin in another possibly future context
>>>  (for example, drawing on screen with the X orientation reversed).
>>>
>>>  Unfortunately this patch does not quite close the bug yet; there are other
>>>  related artifacts which I am still investigating.
>>>
>>>  The patch is against rev. 4679
>>>
>>>  - Cirilo
>>
>> You could try something like this:
>>
>>     int slx = DC->DeviceToLogicalX( 1 ) - DC->DeviceToLogicalX( 0 );
>>     int sly = DC->DeviceToLogicalY( 1 ) - DC->DeviceToLogicalY( 0 );
>>     bool mirrored = (slx > 0 && sly < 0) || (slx < 0 && 
>> sly > 0);
>>
>> to know if the DC is mirrored.
>>
>> -- 
>> Jean-Pierre CHARRAS
>>
> 
> Thanks Jean-Pierre,
> 
>  I'll test that and also check the fix for the mirrored title frame since it is the same issue.
> 
> - Cirilo

The title frame is not mirrored.

However the board itself is mirrored from the X axis.
It could be better to mirror it from the Y axis (like in plot mirror).

Thanks.

-- 
Jean-Pierre CHARRAS


Follow ups

References