kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #12259
Re: 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
Follow ups
References