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:
parent
d71d127c1a
commit
c1a97fc0c3
|
@ -978,7 +978,7 @@ void OPENGL_GAL::DrawPolyline( const SHAPE_LINE_CHAIN& aLineChain )
|
||||||
|
|
||||||
void OPENGL_GAL::DrawPolygon( const std::deque<VECTOR2D>& aPointList )
|
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()] );
|
auto points = std::unique_ptr<GLdouble[]>( new GLdouble[3 * aPointList.size()] );
|
||||||
GLdouble* ptr = points.get();
|
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 )
|
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] );
|
auto points = std::unique_ptr<GLdouble[]>( new GLdouble[3 * aListSize] );
|
||||||
GLdouble* target = points.get();
|
GLdouble* target = points.get();
|
||||||
const VECTOR2D* src = aPointList;
|
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 )
|
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;
|
const int pointCount = aPolygon.SegmentCount() + 1;
|
||||||
std::unique_ptr<GLdouble[]> points( new GLdouble[3 * pointCount] );
|
std::unique_ptr<GLdouble[]> points( new GLdouble[3 * pointCount] );
|
||||||
|
|
Loading…
Reference in New Issue