Fix transparent circle printing

DrawEllipse seems to work fine using transparent bg for all DCs except
printing (which is the only one we use now)  Use two arcs to draw a
transparent fill for the circle instead as a workaround until we
implement Cairo printing

Fixes https://gitlab.com/kicad/code/kicad/issues/10431

(cherry picked from commit cccdac136f)
This commit is contained in:
Seth Hillbrand 2022-01-14 16:10:26 -08:00
parent 93229c37bb
commit de006fc010
1 changed files with 5 additions and 1 deletions

View File

@ -514,7 +514,11 @@ void GRCircle( EDA_RECT* ClipBox, wxDC* DC, int xc, int yc, int r, int width, co
GRSetBrush( DC, Color, NOT_FILLED ); GRSetBrush( DC, Color, NOT_FILLED );
GRSetColorPen( DC, Color, width ); GRSetColorPen( DC, Color, width );
DC->DrawEllipse( xc - r, yc - r, r + r, r + r );
// Draw two arcs here to make a circle. Unfortunately, the printerDC doesn't handle
// transparent brushes when used with circles. It does work for for arcs, however
DC->DrawArc(xc + r, yc, xc - r, yc, xc, yc);
DC->DrawArc(xc - r, yc, xc + r, yc, xc, yc);
} }