Enhancement in zones filling by polygon, and better display for small texts

(more noticeable in eeschema)
This commit is contained in:
charras
2008-10-31 17:02:24 +00:00
parent 07767585c3
commit 365dbe15b8
2 changed files with 30 additions and 10 deletions
+6 -4
View File
@@ -869,8 +869,6 @@ static bool IsGRSPolyDrawable( EDA_Rect* ClipBox, int n, int* Points )
void GRSPoly( EDA_Rect* ClipBox, wxDC* DC, int n, int* Points, int Fill,
int width, int Color, int BgColor )
{
int startx, starty;
if( !IsGRSPolyDrawable( ClipBox, n, Points ) )
return;
@@ -883,11 +881,15 @@ void GRSPoly( EDA_Rect* ClipBox, wxDC* DC, int n, int* Points, int Fill,
}
else
{
startx = Points[n * 2 - 2];
starty = Points[n * 2 - 1];
int endx = Points[n * 2 - 2];
int endy = Points[n * 2 - 1];
GRSetBrush( DC, Color );
DC->DrawLines( n, (wxPoint*) Points );
// The last point is not drawn by DrawLine and DrawLines
// Add it if the polygon is not closed
if ( endx != Points[0] || endy != Points[1] )
DC->DrawPoint(endx, endy);
}
}