]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
0002775: External 20700 RUPTURE CTH_2_1_a
authorouv <oleg.uvarov@opencascade.com>
Thu, 2 Jul 2015 12:43:36 +0000 (15:43 +0300)
committerouv <oleg.uvarov@opencascade.com>
Thu, 2 Jul 2015 12:43:36 +0000 (15:43 +0300)
Visualization part.

src/GLViewer/GLViewer_Drawer.cxx
src/GLViewer/GLViewer_Drawer.h

index b8f1251874ac0cb28d5f1fca136ef353f3baf81c..335601e313d160c935b69858415a089739772f50 100644 (file)
@@ -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<GLViewer_Pnt>::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();
index 8c9f8251016351849bf376f24e20d3cc56602c92..4517cf75a61ca85f058a01a23e3f4e2ca6b0219b 100644 (file)
@@ -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 );