+ //! Sets a default font to be used by drawGLText method
+ /*!
+ *\param font - the default font
+ */
+ inline void setFont( const QFont& font ) { myFont = font; }
+
+ //! Returns a default font used by drawGLText method
+ inline QFont font() const { return myFont; }
+
+ //! Sets a default text displaying format to be used by drawGLText method
+ /*!
+ *\param format - the default text displaying format
+ */
+ inline void setTextFormat( const DisplayTextFormat format ) { myTextFormat = format; }
+
+ //! Returns a default text displaying format used by drawGLText method
+ inline DisplayTextFormat textFormat() const { return myTextFormat; }
+
+ //! Sets a text string displaying scale factor (used only with text format DTF_TEXTURE_SCALABLE)
+ /*!
+ *\param factor - scale factor
+ */
+ inline void setTextScale( const GLfloat factor ) { myTextScale = factor; }
+
+ //! Returns a text string displaying scale factor
+ inline GLfloat textScale() const { return myTextScale; }
+
+ //! Returns a rectangle of text (without viewer scale)
+ GLViewer_Rect textRect( const QString& ) const;
+
+
+ //! Draw rectangle with predefined color
+ static void drawRectangle( GLViewer_Rect* theRect, QColor = Qt::black );
+
+protected:
+ //! Draw basic primitives: rectangle, contour, polygon, vertex, cross, arrow
+ //* with predefined color
+ static void drawRectangle( GLViewer_Rect*, GLfloat, GLfloat = 0, QColor = Qt::black,
+ bool = false, QColor = Qt::white );
+ static void drawContour( GLViewer_Rect*, QColor, GLfloat, GLushort, bool );
+ static void drawContour( const GLViewer_PntList&, QColor, GLfloat );
+ static void drawPolygon( GLViewer_Rect*, QColor, GLushort, bool );
+ static void drawPolygon( const GLViewer_PntList&, QColor );
+ static void drawVertex( GLfloat, GLfloat, QColor );
+ static void drawCross( GLfloat, GLfloat, QColor );
+ static void drawArrow( const GLfloat red, const GLfloat green, const GLfloat blue,
+ GLfloat, GLfloat, GLfloat, GLfloat,
+ GLfloat, GLfloat, GLfloat, GLboolean = GL_FALSE );
+
+ //! Draw object text
+ virtual void drawText( GLViewer_Object* theObject );
+
+ //! X Scale factor
+ float myXScale;
+ //! Y scale factor
+ float myYScale;