From: ouv Date: Thu, 2 Jul 2015 12:43:36 +0000 (+0300) Subject: 0002775: External 20700 RUPTURE X-Git-Tag: CTH_2_1_a X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=307de7ef0f694ac584d44d10ff53dc15db248dc6;p=modules%2Fgui.git 0002775: External 20700 RUPTURE Visualization part. --- diff --git a/src/GLViewer/GLViewer_Drawer.cxx b/src/GLViewer/GLViewer_Drawer.cxx index b8f125187..335601e31 100644 --- a/src/GLViewer/GLViewer_Drawer.cxx +++ b/src/GLViewer/GLViewer_Drawer.cxx @@ -1031,14 +1031,14 @@ bool GLViewer_Drawer::translateToEMF( HDC hDC, GLViewer_CoordSystem* aViewerCS, \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::const_iterator it = pntList.begin(); for( ; it != pntList.end(); ++it ) glVertex2f( (*it).x(), (*it).y() ); @@ -1054,7 +1054,7 @@ void GLViewer_Drawer::drawContour( const GLViewer_PntList& pntList, QColor color \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(); diff --git a/src/GLViewer/GLViewer_Drawer.h b/src/GLViewer/GLViewer_Drawer.h index 8c9f82510..4517cf75a 100644 --- a/src/GLViewer/GLViewer_Drawer.h +++ b/src/GLViewer/GLViewer_Drawer.h @@ -415,7 +415,7 @@ public: 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 );