\param color - color of contour
\param lineWidth - width of line
*/
-void GLViewer_Drawer::drawContour( const GLViewer_PntList& pntList, QColor color, GLfloat lineWidth )
+void GLViewer_Drawer::drawContour( const GLViewer_PntList& pntList, QColor color, GLfloat lineWidth, bool isLoop )
{
glColor3f( ( GLfloat )color.red() / 255,
( GLfloat )color.green() / 255,
( GLfloat )color.blue() / 255 );
glLineWidth( lineWidth );
- glBegin( GL_LINES );
+ glBegin( isLoop ? GL_LINE_LOOP : GL_LINES );
QList<GLViewer_Pnt>::const_iterator it = pntList.begin();
for( ; it != pntList.end(); ++it )
glVertex2f( (*it).x(), (*it).y() );
\param isStripe - enables line stipple
*/
void GLViewer_Drawer::drawContour( GLViewer_Rect* rect, QColor color, GLfloat lineWidth,
- GLushort pattern, bool isStripe )
+ GLushort pattern, bool isStripe )
{
float x1 = rect->left();
float x2 = rect->right();
protected:
static void drawContour( GLViewer_Rect*, QColor, GLfloat, GLushort, bool );
- static void drawContour( const GLViewer_PntList&, QColor, GLfloat );
+ static void drawContour( const GLViewer_PntList&, QColor, GLfloat, bool );
static void drawPolygon( GLViewer_Rect*, QColor, GLushort, bool );
static void drawPolygon( const GLViewer_PntList&, QColor );
static void drawVertex( GLfloat, GLfloat, QColor );