More printing fixes.
This commit is contained in:
parent
85bc2ae015
commit
b74b2efff0
|
@ -220,7 +220,8 @@ void GRSetColorPen( wxDC* DC, EDA_COLOR_T Color, int width, wxPenStyle style )
|
||||||
if( s_DC_lastcolor != Color
|
if( s_DC_lastcolor != Color
|
||||||
|| s_DC_lastwidth != width
|
|| s_DC_lastwidth != width
|
||||||
|| s_DC_lastpenstyle != style
|
|| s_DC_lastpenstyle != style
|
||||||
|| s_DC_lastDC != DC )
|
|| s_DC_lastDC != DC
|
||||||
|
|| s_ForceBlackPen )
|
||||||
{
|
{
|
||||||
wxPen pen;
|
wxPen pen;
|
||||||
|
|
||||||
|
@ -247,7 +248,7 @@ void GRSetBrush( wxDC* DC, EDA_COLOR_T Color, bool fill )
|
||||||
|
|
||||||
if( s_DC_lastbrushcolor != Color
|
if( s_DC_lastbrushcolor != Color
|
||||||
|| s_DC_lastbrushfill != fill
|
|| s_DC_lastbrushfill != fill
|
||||||
|| s_DC_lastDC != DC )
|
|| s_DC_lastDC != DC )
|
||||||
{
|
{
|
||||||
wxBrush brush;
|
wxBrush brush;
|
||||||
|
|
||||||
|
@ -501,8 +502,8 @@ void GRCSegm( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GRSetBrush( DC, Color, NOT_FILLED );
|
||||||
GRSetColorPen( DC, Color, aPenSize );
|
GRSetColorPen( DC, Color, aPenSize );
|
||||||
GRSetBrush( DC, Color, false );
|
|
||||||
|
|
||||||
int radius = (width + 1) >> 1;
|
int radius = (width + 1) >> 1;
|
||||||
int dx = x2 - x1;
|
int dx = x2 - x1;
|
||||||
|
@ -646,12 +647,10 @@ static void GRSPoly( EDA_RECT* ClipBox, wxDC* DC, int n, wxPoint Points[],
|
||||||
if( !IsGRSPolyDrawable( ClipBox, n, Points ) )
|
if( !IsGRSPolyDrawable( ClipBox, n, Points ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GRSetColorPen( DC, Color, width );
|
|
||||||
|
|
||||||
if( Fill && ( n > 2 ) )
|
if( Fill && ( n > 2 ) )
|
||||||
{
|
{
|
||||||
GRSetBrush( DC, BgColor, FILLED );
|
GRSetBrush( DC, BgColor, FILLED );
|
||||||
|
GRSetColorPen( DC, Color, width );
|
||||||
|
|
||||||
/* clip before send the filled polygon to wxDC, because under linux
|
/* clip before send the filled polygon to wxDC, because under linux
|
||||||
* (GTK?) polygons having large coordinates are incorrectly drawn
|
* (GTK?) polygons having large coordinates are incorrectly drawn
|
||||||
|
@ -682,13 +681,12 @@ static void GRSClosedPoly( EDA_RECT* aClipBox, wxDC* aDC,
|
||||||
if( !IsGRSPolyDrawable( aClipBox, aPointCount, aPoints ) )
|
if( !IsGRSPolyDrawable( aClipBox, aPointCount, aPoints ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GRSetColorPen( aDC, aColor, aWidth );
|
|
||||||
|
|
||||||
if( aFill && ( aPointCount > 2 ) )
|
if( aFill && ( aPointCount > 2 ) )
|
||||||
{
|
{
|
||||||
GRLastMoveToX = aPoints[aPointCount - 1].x;
|
GRLastMoveToX = aPoints[aPointCount - 1].x;
|
||||||
GRLastMoveToY = aPoints[aPointCount - 1].y;
|
GRLastMoveToY = aPoints[aPointCount - 1].y;
|
||||||
GRSetBrush( aDC, aBgColor, FILLED );
|
GRSetBrush( aDC, aBgColor, FILLED );
|
||||||
|
GRSetColorPen( aDC, aColor, aWidth );
|
||||||
ClipAndDrawPoly( aClipBox, aDC, aPoints, aPointCount );
|
ClipAndDrawPoly( aClipBox, aDC, aPoints, aPointCount );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -761,8 +759,8 @@ void GRCircle( EDA_RECT* ClipBox, wxDC* DC, int xc, int yc, int r, int width, ED
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GRSetBrush( DC, Color, NOT_FILLED );
|
||||||
GRSetColorPen( DC, Color, width );
|
GRSetColorPen( DC, Color, width );
|
||||||
GRSetBrush( DC, Color, false );
|
|
||||||
DC->DrawEllipse( xc - r, yc - r, r + r, r + r );
|
DC->DrawEllipse( xc - r, yc - r, r + r, r + r );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -804,8 +802,8 @@ void GRFilledCircle( EDA_RECT* ClipBox, wxDC* DC, int x, int y, int r,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GRSetColorPen( DC, Color, width );
|
|
||||||
GRSetBrush( DC, BgColor, FILLED );
|
GRSetBrush( DC, BgColor, FILLED );
|
||||||
|
GRSetColorPen( DC, Color, width );
|
||||||
DC->DrawEllipse( x - r, y - r, r + r, r + r );
|
DC->DrawEllipse( x - r, y - r, r + r, r + r );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -851,8 +849,8 @@ void GRArc1( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GRSetColorPen( DC, Color, width );
|
|
||||||
GRSetBrush( DC, Color );
|
GRSetBrush( DC, Color );
|
||||||
|
GRSetColorPen( DC, Color, width );
|
||||||
DC->DrawArc( x1, y1, x2, y2, xc, yc );
|
DC->DrawArc( x1, y1, x2, y2, xc, yc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -963,8 +961,8 @@ void GRArc( EDA_RECT* ClipBox, wxDC* DC, int xc, int yc, double StAngle,
|
||||||
y2 = 0;
|
y2 = 0;
|
||||||
RotatePoint( &x2, &y2, StAngle );
|
RotatePoint( &x2, &y2, StAngle );
|
||||||
|
|
||||||
|
GRSetBrush( DC, Color, NOT_FILLED );
|
||||||
GRSetColorPen( DC, Color );
|
GRSetColorPen( DC, Color );
|
||||||
GRSetBrush( DC, Color, false );
|
|
||||||
DC->DrawArc( xc + x1, yc - y1, xc + x2, yc - y2, xc, yc );
|
DC->DrawArc( xc + x1, yc - y1, xc + x2, yc - y2, xc, yc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1014,8 +1012,8 @@ void GRArc( EDA_RECT* ClipBox,
|
||||||
y2 = 0;
|
y2 = 0;
|
||||||
RotatePoint( &x2, &y2, StAngle );
|
RotatePoint( &x2, &y2, StAngle );
|
||||||
|
|
||||||
GRSetColorPen( DC, Color, width );
|
|
||||||
GRSetBrush( DC, Color );
|
GRSetBrush( DC, Color );
|
||||||
|
GRSetColorPen( DC, Color, width );
|
||||||
DC->DrawArc( x + x1, y - y1, x + x2, y - y2, x, y );
|
DC->DrawArc( x + x1, y - y1, x + x2, y - y2, x, y );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1107,6 +1105,7 @@ void GRSFilledRect( EDA_RECT* aClipBox, wxDC* aDC, int x1, int y1, int x2, int y
|
||||||
points[2] = wxPoint(x2, y2);
|
points[2] = wxPoint(x2, y2);
|
||||||
points[3] = wxPoint(x2, y1);
|
points[3] = wxPoint(x2, y1);
|
||||||
points[4] = points[0];
|
points[4] = points[0];
|
||||||
|
|
||||||
GRSetBrush( aDC, aBgColor, FILLED );
|
GRSetBrush( aDC, aBgColor, FILLED );
|
||||||
GRSetColorPen( aDC, aBgColor, aWidth );
|
GRSetColorPen( aDC, aBgColor, aWidth );
|
||||||
|
|
||||||
|
|
|
@ -452,7 +452,7 @@ void SCH_PRINTOUT::DrawPage( SCH_SCREEN* aScreen )
|
||||||
|
|
||||||
EDA_COLOR_T bg_color = GetSchFrameParent()->GetDrawBgColor();
|
EDA_COLOR_T bg_color = GetSchFrameParent()->GetDrawBgColor();
|
||||||
|
|
||||||
aScreen->Draw( panel, dc, GR_DEFAULT_DRAWMODE );
|
aScreen->Draw( panel, dc, (GR_DRAWMODE) 0 );
|
||||||
|
|
||||||
if( printReference )
|
if( printReference )
|
||||||
parent->DrawWorkSheet( dc, aScreen, GetDefaultLineThickness(),
|
parent->DrawWorkSheet( dc, aScreen, GetDefaultLineThickness(),
|
||||||
|
|
Loading…
Reference in New Issue