Loading common/gr_basic.cpp +11 −0 Original line number Original line Diff line number Diff line Loading @@ -1901,12 +1901,23 @@ void GRSFilledRect( EDA_Rect* ClipBox, wxDC* DC, * too large coordinates (seems due to integer overflows in calculations) * too large coordinates (seems due to integer overflows in calculations) * Could be removed in some years, if become unnecessary. * Could be removed in some years, if become unnecessary. */ */ /* Note: aClipBox == NULL is legal, so if aClipBox == NULL, * the polygon is drawn, but not clipped */ #include "SutherlandHodgmanClipPoly.h" #include "SutherlandHodgmanClipPoly.h" void ClipAndDrawFilledPoly( EDA_Rect* aClipBox, void ClipAndDrawFilledPoly( EDA_Rect* aClipBox, wxDC* aDC, wxDC* aDC, wxPoint aPoints[], wxPoint aPoints[], int n ) int n ) { { if( aClipBox == NULL ) { aDC->DrawPolygon( n, aPoints ); return; } // A clip box exists: clip and draw the polygon. static vector<wxPoint> clippedPolygon; static vector<wxPoint> clippedPolygon; static pointVector inputPolygon, outputPolygon; static pointVector inputPolygon, outputPolygon; Loading Loading
common/gr_basic.cpp +11 −0 Original line number Original line Diff line number Diff line Loading @@ -1901,12 +1901,23 @@ void GRSFilledRect( EDA_Rect* ClipBox, wxDC* DC, * too large coordinates (seems due to integer overflows in calculations) * too large coordinates (seems due to integer overflows in calculations) * Could be removed in some years, if become unnecessary. * Could be removed in some years, if become unnecessary. */ */ /* Note: aClipBox == NULL is legal, so if aClipBox == NULL, * the polygon is drawn, but not clipped */ #include "SutherlandHodgmanClipPoly.h" #include "SutherlandHodgmanClipPoly.h" void ClipAndDrawFilledPoly( EDA_Rect* aClipBox, void ClipAndDrawFilledPoly( EDA_Rect* aClipBox, wxDC* aDC, wxDC* aDC, wxPoint aPoints[], wxPoint aPoints[], int n ) int n ) { { if( aClipBox == NULL ) { aDC->DrawPolygon( n, aPoints ); return; } // A clip box exists: clip and draw the polygon. static vector<wxPoint> clippedPolygon; static vector<wxPoint> clippedPolygon; static pointVector inputPolygon, outputPolygon; static pointVector inputPolygon, outputPolygon; Loading