From c1a97fc0c38a933569859cdc25d1eec6d92b8599 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 21 Aug 2020 15:40:36 -0700 Subject: [PATCH] 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 --- common/gal/opengl/opengl_gal.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index a94ef0ea40..e4455d7619 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -978,7 +978,7 @@ void OPENGL_GAL::DrawPolyline( const SHAPE_LINE_CHAIN& aLineChain ) void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) { - wxCHECK( aPointList.size() > 2, /* void */ ); + wxCHECK( aPointList.size() >= 2, /* void */ ); auto points = std::unique_ptr( new GLdouble[3 * aPointList.size()] ); GLdouble* ptr = points.get(); @@ -995,7 +995,7 @@ void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) void OPENGL_GAL::DrawPolygon( const VECTOR2D aPointList[], int aListSize ) { - wxCHECK( aListSize > 2, /* void */ ); + wxCHECK( aListSize >= 2, /* void */ ); auto points = std::unique_ptr( 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 points( new GLdouble[3 * pointCount] );