GAL: Revision to 80af7b3158, allow LIB_POLYLINE

LIB_POLYLINE has a filled/not completely stroked draw mechanism that
allows stroking singular lines that will skip the fill
This commit is contained in:
Seth Hillbrand 2020-08-21 15:40:36 -07:00
parent d71d127c1a
commit c1a97fc0c3
1 changed files with 3 additions and 3 deletions

View File

@ -978,7 +978,7 @@ void OPENGL_GAL::DrawPolyline( const SHAPE_LINE_CHAIN& aLineChain )
void OPENGL_GAL::DrawPolygon( const std::deque<VECTOR2D>& aPointList )
{
wxCHECK( aPointList.size() > 2, /* void */ );
wxCHECK( aPointList.size() >= 2, /* void */ );
auto points = std::unique_ptr<GLdouble[]>( new GLdouble[3 * aPointList.size()] );
GLdouble* ptr = points.get();
@ -995,7 +995,7 @@ void OPENGL_GAL::DrawPolygon( const std::deque<VECTOR2D>& aPointList )
void OPENGL_GAL::DrawPolygon( const VECTOR2D aPointList[], int aListSize )
{
wxCHECK( aListSize > 2, /* void */ );
wxCHECK( aListSize >= 2, /* void */ );
auto points = std::unique_ptr<GLdouble[]>( new GLdouble[3 * aListSize] );
GLdouble* target = points.get();
const VECTOR2D* src = aPointList;
@ -1094,7 +1094,7 @@ void OPENGL_GAL::DrawPolygon( const SHAPE_POLY_SET& aPolySet )
void OPENGL_GAL::DrawPolygon( const SHAPE_LINE_CHAIN& aPolygon )
{
wxCHECK( aPolygon.PointCount() > 2, /* void */ );
wxCHECK( aPolygon.PointCount() >= 2, /* void */ );
const int pointCount = aPolygon.SegmentCount() + 1;
std::unique_ptr<GLdouble[]> points( new GLdouble[3 * pointCount] );