]> SALOME platform Git repositories - modules/gui.git/blob - src/GLViewer/GLViewer_Compass.cxx
Salome HOME
*** empty log message ***
[modules/gui.git] / src / GLViewer / GLViewer_Compass.cxx
1 // File:      GLViewer_Compass.cxx
2 // Created:   November, 2004
3 // Author:    OCC team
4 // Copyright (C) CEA 2004
5
6 //#include <GLViewerAfx.h>
7 #include "GLViewer_Compass.h"
8 #include "GLViewer_Drawer.h"
9
10 GLViewer_Compass::GLViewer_Compass ( const QColor& color, const int size, const Position pos,
11                                const int WidthTop, const int WidthBottom, const int HeightTop,
12                                const int HeightBottom ){
13     myCol = color;
14     mySize = size;
15     myPos = pos;
16     myArrowWidthTop = WidthTop;
17     myArrowWidthBottom = WidthBottom;
18     myArrowHeightTop = HeightTop;
19     myArrowHeightBottom = HeightBottom;
20     myIsVisible = true;
21     QFont* aFont = new QFont("Times",16);
22     myFont = new GLViewer_TexFont( aFont );
23     isGenereted = false;
24     //myFont->generateTexture();
25 }
26
27 GLViewer_Compass::~GLViewer_Compass()
28 {
29     delete myFont;
30 }
31
32 GLViewer_TexFont* GLViewer_Compass::getFont()
33
34     if(!isGenereted) 
35     {
36         myFont->generateTexture();
37         isGenereted = true;
38     }    
39     return myFont;
40 }
41
42 void GLViewer_Compass::setFont( QFont theFont )
43 {
44     delete myFont;
45     myFont = new GLViewer_TexFont( &theFont );
46