Version: 9.13.0
GEOM_Annotation.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 
23 // GEOM OBJECT : interactive object for Geometry entities visualization
24 // File : GEOM_Annotation.hxx
25 // Module : GEOM
26 //
27 #ifndef GEOM_Annotation_HeaderFile
28 #define GEOM_Annotation_HeaderFile
29 
30 #include <AIS_InteractiveObject.hxx>
31 #include <Bnd_Box.hxx>
32 #include <Font_FontAspect.hxx>
33 #include <gp_Pnt.hxx>
34 #include <NCollection_Handle.hxx>
35 #include <NCollection_String.hxx>
36 #include <OpenGl_Element.hxx>
37 #include <Prs3d_Presentation.hxx>
38 #include <Prs3d_LineAspect.hxx>
39 #include <Prs3d_TextAspect.hxx>
40 #include <PrsMgr_PresentationManager3d.hxx>
41 #include <Select3D_SensitiveBox.hxx>
42 #include <SelectMgr_EntityOwner.hxx>
43 #include <StdSelect_Shape.hxx>
44 #include <TCollection_ExtendedString.hxx>
45 
46 #include <Basics_OCCTVersion.hxx>
47 #if OCC_VERSION_LARGE >= 0x07040000
48 #include <Graphic3d_Text.hxx>
49 #else
50 #include <OpenGl_TextParam.hxx>
51 #endif
52 
53 class OpenGl_GraphicDriver;
54 class OpenGl_PrimitiveArray;
55 class OpenGl_Text;
56 class V3d_View;
57 
63 {
64 public:
65 
67 
68 
71  enum HighlightMode
72  {
73  HighlightAll = 0,
74  HighlightLabel = 1
75  };
76 
77 public:
78 
80  Standard_EXPORT GEOM_Annotation();
81 
83  virtual ~GEOM_Annotation() {}
84 
87  Standard_EXPORT void SetText( const TCollection_ExtendedString& theText );
88 
90  const TCollection_ExtendedString& GetText() const { return myText; }
91 
98  Standard_EXPORT void SetPosition( const gp_Pnt& thePosition );
99 
101  const gp_Pnt& GetPosition() const { return myPosition; }
102 
107  Standard_EXPORT void SetIsScreenFixed( const Standard_Boolean theIsFixed );
108 
110  Standard_Boolean GetIsScreenFixed() const { return myIsScreenFixed; }
111 
115  Standard_EXPORT void Set2dPosition( const Handle(V3d_View)& theView );
116 
121  Standard_EXPORT void Set3dPosition( const Handle(V3d_View)& theView );
122 
126  Standard_EXPORT void SetAttachPoint( const gp_Pnt& thePoint );
127 
129  const gp_Pnt& GetAttachPoint() const { return myAttach; }
130 
132  Standard_EXPORT void SetHilightShape( const TopoDS_Shape& theShape );
133 
135  const TopoDS_Shape HilightShape() const { return myShape; }
136 
137 public:
138 
140  Standard_EXPORT virtual void SetColor( const Quantity_Color& theColor ) Standard_OVERRIDE;
141 
143  Standard_EXPORT void SetTextColor( const Quantity_Color& theColor );
144 
146  Quantity_Color GetTextColor() const { return myDrawer->TextAspect()->Aspect()->Color(); }
147 
149  Standard_EXPORT void SetLineColor( const Quantity_Color& theColor);
150 
152  Quantity_Color GetLineColor() const { return myDrawer->LineAspect()->Aspect()->Color(); }
153 
155  Standard_EXPORT void SetLineWidth( const Standard_Real theLineWidth );
156 
158  Standard_Real GetLineWidth() const { return myDrawer->LineAspect()->Aspect()->Width(); }
159 
161  Standard_EXPORT void SetLineStyle( const Aspect_TypeOfLine theStyle );
162 
164  Aspect_TypeOfLine GetLineStyle() const { return myDrawer->LineAspect()->Aspect()->Type(); }
165 
167  Standard_EXPORT void SetHiddenLineStyle( const Aspect_TypeOfLine theStyle );
168 
170  Aspect_TypeOfLine GetHiddenLineStyle() const { return myDrawer->HiddenLineAspect()->Aspect()->Type(); }
171 
173  Standard_EXPORT void SetTextHeight( const Standard_Real theHeight );
174 
176  Standard_Real GetTextHeight() const { return myDrawer->TextAspect()->Height(); }
177 
179  Standard_EXPORT void SetFontAspect( const Font_FontAspect theFontAspect );
180 
182  Font_FontAspect GetFontAspect() const { return myDrawer->TextAspect()->Aspect()->GetTextFontAspect(); }
183 
185  Standard_EXPORT void SetFont( const TCollection_AsciiString& theFont );
186 
188  TCollection_AsciiString GetFont() const { return myDrawer->TextAspect()->Aspect()->Font(); }
189 
194  void SetAutoHide( const Standard_Boolean theIsEnable ) { myIsAutoHide = theIsEnable; }
195 
197  Standard_Boolean GetAutoHide() const { return myIsAutoHide; }
198 
201  void SetHighlightMode( const HighlightMode theMode ) { myHilightMode = theMode; }
202 
204  HighlightMode GetHilightMode() const { return myHilightMode; }
205 
211  Standard_EXPORT void SetDepthCulling( const Standard_Boolean theToEnable );
212 
214  Standard_Boolean GetDepthCulling() const { return myIsDepthCulling; }
215 
216 // Helper tools:
217 public:
218 
220  Standard_EXPORT void SetDefaultZLayer();
221 
228  Standard_EXPORT static gp_Pnt GetDefaultPosition( const Standard_Boolean theIsScreenFixed,
229  const gp_Pnt& theAttachPnt,
230  const Standard_Real theOffset,
231  const Handle(V3d_View)& theView );
232 
237  Standard_EXPORT static gp_Pnt ConvertPosition2d( const gp_Pnt& thePosition,
238  const gp_Pnt& theAttach,
239  const Handle(V3d_View)& theView );
240 
245  Standard_EXPORT static gp_Pnt ConvertPosition3d( const gp_Pnt& thePosition,
246  const gp_Pnt& theAttach,
247  const Handle(V3d_View)& theView );
248 
249 // Interactive dragging:
250 public:
251 
253  Standard_EXPORT void BeginDrag();
254 
258  Standard_EXPORT void Drag( const Standard_Integer theDx,
259  const Standard_Integer theDy,
260  const Handle(V3d_View)& theView );
261 
263  Standard_EXPORT void EndDrag();
264 
266  Standard_EXPORT void UndoDrag();
267 
268 private:
269 
270  virtual void Compute( const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
271  const Handle(Prs3d_Presentation)& thePresentation,
272  const Standard_Integer theMode = 0 ) Standard_OVERRIDE;
273 
274  virtual void ComputeSelection( const Handle(SelectMgr_Selection)& theSelection,
275  const Standard_Integer theMode ) Standard_OVERRIDE;
276 
277 #if OCC_VERSION_LARGE >= 0x070400ff
278  virtual void setLocalTransformation( const Handle(TopLoc_Datum3D)& /*theTransformation*/ ) Standard_OVERRIDE {}
279 #else
280  virtual void setLocalTransformation( const Handle(Geom_Transformation)& /*theTransformation*/ ) Standard_OVERRIDE {}
281 #endif
282 
283  virtual void SetTransformPersistence( const Handle(Graphic3d_TransformPers)& /*theTrsfPers*/ ) Standard_OVERRIDE {}
284 
285  Bnd_Box TextBoundingBox() const;
286 
287  void SetPosition( const gp_Pnt& thePosition, const Standard_Boolean theUpdateSelection );
288 
289 private:
290 
291  gp_Pnt myAttach;
292  gp_Pnt myPosition;
294  Standard_Boolean myIsScreenFixed;
295  Standard_Boolean myIsAutoHide;
296  Standard_Boolean myIsDepthCulling;
297  HighlightMode myHilightMode;
298  TCollection_ExtendedString myText;
299  TopoDS_Shape myShape;
300 
301 private:
302 
306  {
307  public:
308 
314  OpenGl_Annotation( GEOM_Annotation* theAnnotation,
315  const Standard_Integer theTextHeight,
316  const OpenGl_GraphicDriver* theDriver );
317 
319  virtual ~OpenGl_Annotation();
320 
322  virtual void Release( OpenGl_Context* theCtx ) Standard_OVERRIDE;
323 
325  virtual void Render( const Handle(OpenGl_Workspace)& theWorkspace ) const Standard_OVERRIDE;
326 
327  void SetDepthMode( const int theMode ) { myDepthMode = theMode; }
328 
329  private:
330 
331  struct TextSize {
332  float x; // width
333  float y; // height
334  float a; // ascent
335  float d; // descent
336  };
337 
339  NCollection_String myText;
340 #if OCC_VERSION_LARGE >= 0x07040000
341  Handle(Graphic3d_Text) myTextParams;
342 #else
343  OpenGl_TextParam myTextParams;
344 #endif
345  OpenGl_Text* myTextDraw;
346  OpenGl_PrimitiveArray* myTextLineDraw;
347  OpenGl_PrimitiveArray* myExtLineDraw;
348  OpenGl_PrimitiveArray* myExtMarkerDraw;
350  mutable float myTextLineY;
352  mutable Graphic3d_Vec2 myTextUnderline;
353  mutable unsigned int myTextDPI;
354  };
355 
356  friend class OpenGl_Annotation; // allow opengl element to get private data and invoke callback methods
357 
358 public:
359 
362  {
363  public:
364 
366  GEOM_AnnotationOwner( const TopoDS_Shape& theShape,
367  const Handle(SelectMgr_SelectableObject)& theSelectable,
368  const Standard_Integer thePriority )
369  : SelectMgr_EntityOwner( theSelectable, thePriority ),
370  myShape( theShape ) {}
371 
376  virtual void
377  HilightWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM,
378  const Handle(Prs3d_Drawer)& theStyle,
379  const Standard_Integer theMode = 0 ) Standard_OVERRIDE;
380 
382  virtual void
383  Unhilight ( const Handle(PrsMgr_PresentationManager)& thePM,
384  const Standard_Integer theMode = 0 ) Standard_OVERRIDE;
385 
388  virtual void
389  Clear ( const Handle(PrsMgr_PresentationManager)& thePM,
390  const Standard_Integer theMode = 0 ) Standard_OVERRIDE;
391 
392  private:
393 
394  TopoDS_Shape myShape;
395  Handle(StdSelect_Shape) myPrsSh;
396  };
397 
401  {
402  public:
403 
406  const Bnd_Box& theBox,
407  const Standard_Boolean theIsDepthCulling )
408  : Select3D_SensitiveBox( theOwner, theBox ),
409  myIsDepthCulling( theIsDepthCulling ) {}
410 
412  virtual Standard_Boolean Matches( SelectBasics_SelectingVolumeManager& theMgr,
413  SelectBasics_PickResult& thePickResult ) Standard_OVERRIDE
414  {
415  const Standard_Boolean isMatches = Select3D_SensitiveBox::Matches( theMgr, thePickResult );
416  if ( !myIsDepthCulling )
417  {
418  thePickResult = SelectBasics_PickResult( -DBL_MAX, thePickResult.DistToGeomCenter(), thePickResult.PickedPoint() );
419  }
420  return isMatches;
421  }
422 
423  private:
424 
425  Standard_Boolean myIsDepthCulling;
426  };
427 };
428 
430 
431 #endif
Handle(TColStd_HSequenceOfTransient) AdvancedEngine_IOperations
Create a T-shape object with specified caracteristics for the main and the incident pipes (radius,...
Definition: AdvancedEngine_IOperations.cxx:1907
DEFINE_STANDARD_HANDLE(GEOM_Field, GEOM_BaseObject) DEFINE_STANDARD_HANDLE(GEOM_FieldStep
Custom entity owner implementing correct highlight for topmost mode.
Definition: GEOM_Annotation.hxx:362
TopoDS_Shape myShape
Definition: GEOM_Annotation.hxx:394
GEOM_AnnotationOwner(const TopoDS_Shape &theShape, const Handle(SelectMgr_SelectableObject)&theSelectable, const Standard_Integer thePriority)
Constructor.
Definition: GEOM_Annotation.hxx:366
virtual void HilightWithColor(const Handle(PrsMgr_PresentationManager3d)&thePM, const Handle(Prs3d_Drawer)&theStyle, const Standard_Integer theMode=0) Standard_OVERRIDE
Perform highlighting of the presentation.
Definition: GEOM_Annotation.cxx:913
virtual void Unhilight(const Handle(PrsMgr_PresentationManager)&thePM, const Standard_Integer theMode=0) Standard_OVERRIDE
Removes highlighting from the type of shape.
Definition: GEOM_Annotation.cxx:949
virtual void Clear(const Handle(PrsMgr_PresentationManager)&thePM, const Standard_Integer theMode=0) Standard_OVERRIDE
Clears the presentation manager object aPM of all shapes with the given selection mode.
Definition: GEOM_Annotation.cxx:962
Handle(StdSelect_Shape) myPrsSh
Custom sensitive entity with implementing option to support selection with depth culling flag turned ...
Definition: GEOM_Annotation.hxx:401
Standard_Boolean myIsDepthCulling
Definition: GEOM_Annotation.hxx:425
GEOM_AnnotationSensEntity(const Handle(SelectMgr_EntityOwner)&theOwner, const Bnd_Box &theBox, const Standard_Boolean theIsDepthCulling)
Constructor.
Definition: GEOM_Annotation.hxx:405
virtual Standard_Boolean Matches(SelectBasics_SelectingVolumeManager &theMgr, SelectBasics_PickResult &thePickResult) Standard_OVERRIDE
Checks whether the box overlaps current selecting volume.
Definition: GEOM_Annotation.hxx:412
Custom element implementing dynamic rendering of 3D annotation and invoking dynamic callback in prese...
Definition: GEOM_Annotation.hxx:306
unsigned int myTextDPI
Text's DPI scale used for last rendering.
Definition: GEOM_Annotation.hxx:353
virtual void Release(OpenGl_Context *theCtx) Standard_OVERRIDE
Releases GL resources with the given GL context.
Definition: GEOM_Annotation.cxx:680
OpenGl_Text * myTextDraw
Text draw element.
Definition: GEOM_Annotation.hxx:345
virtual void Render(const Handle(OpenGl_Workspace)&theWorkspace) const Standard_OVERRIDE
Renders the annotation graphical elements.
Definition: GEOM_Annotation.cxx:700
virtual ~OpenGl_Annotation()
Destructor. Releases GL resources with NULL context.
Definition: GEOM_Annotation.cxx:670
OpenGl_PrimitiveArray * myExtLineDraw
Extension line draw element.
Definition: GEOM_Annotation.hxx:347
GEOM_Annotation * myAISObject
Instance of presentation class.
Definition: GEOM_Annotation.hxx:338
void SetDepthMode(const int theMode)
Definition: GEOM_Annotation.hxx:327
OpenGl_Annotation(GEOM_Annotation *theAnnotation, const Standard_Integer theTextHeight, const OpenGl_GraphicDriver *theDriver)
Constructor.
Definition: GEOM_Annotation.cxx:625
int myDepthMode
Depth mode for drawing hidden line presentation.
Definition: GEOM_Annotation.hxx:349
Graphic3d_Vec2 myTextUnderline
Text's underline position.
Definition: GEOM_Annotation.hxx:352
OpenGl_PrimitiveArray * myTextLineDraw
Text underline draw element.
Definition: GEOM_Annotation.hxx:346
OpenGl_TextParam myTextParams
Text draw parameters.
Definition: GEOM_Annotation.hxx:343
TextSize myTextSize
Text's size parameters.
Definition: GEOM_Annotation.hxx:351
OpenGl_PrimitiveArray * myExtMarkerDraw
Extension marker draw element.
Definition: GEOM_Annotation.hxx:348
float myTextLineY
Text's underlines relative position.
Definition: GEOM_Annotation.hxx:350
NCollection_String myText
Text string of annotation label.
Definition: GEOM_Annotation.hxx:339
Interactive object, representating annotation entity.
Definition: GEOM_Annotation.hxx:63
gp_Pnt myStartPosition
Position before starting dragging operation.
Definition: GEOM_Annotation.hxx:293
Standard_EXPORT void SetText(const TCollection_ExtendedString &theText)
Sets annotation text string.
Definition: GEOM_Annotation.cxx:96
Standard_Boolean myIsScreenFixed
Flag indicating whether "screen fixed" positioning mode is turned on or off.
Definition: GEOM_Annotation.hxx:294
Standard_EXPORT GEOM_Annotation()
Constructor.
Standard_EXPORT void SetDefaultZLayer()
Restores default z-layer for this presentation.
Definition: GEOM_Annotation.cxx:365
Aspect_TypeOfLine GetLineStyle() const
Retusn style of connection line.
Definition: GEOM_Annotation.hxx:164
gp_Pnt myAttach
Attachment point of extension line.
Definition: GEOM_Annotation.hxx:291
Standard_Boolean myIsAutoHide
Flag indicating whether "auto-hiding" option is turned on.
Definition: GEOM_Annotation.hxx:295
Standard_EXPORT void SetLineColor(const Quantity_Color &theColor)
Sets line's color.
Definition: GEOM_Annotation.cxx:253
virtual void Compute(const Handle(PrsMgr_PresentationManager3d)&thePresentationManager, const Handle(Prs3d_Presentation)&thePresentation, const Standard_Integer theMode=0) Standard_OVERRIDE
Definition: GEOM_Annotation.cxx:445
void SetAutoHide(const Standard_Boolean theIsEnable)
Sets annotation auto-hiding option.
Definition: GEOM_Annotation.hxx:194
Standard_EXPORT void SetHiddenLineStyle(const Aspect_TypeOfLine theStyle)
Sets style of hidden connection line.
Definition: GEOM_Annotation.cxx:295
Standard_EXPORT void SetFont(const TCollection_AsciiString &theFont)
Sets font used for drawing the label.
Definition: GEOM_Annotation.cxx:337
virtual void setLocalTransformation(const Handle(Geom_Transformation)&) Standard_OVERRIDE
Definition: GEOM_Annotation.hxx:280
Standard_EXPORT void SetIsScreenFixed(const Standard_Boolean theIsFixed)
Sets or disables "2D screen fixed" positioning mode.
Definition: GEOM_Annotation.cxx:143
Standard_EXPORT void Set3dPosition(const Handle(V3d_View)&theView)
Converts annotation position from screen fixed coordinates to 3D position and modifies its "2D screen...
Definition: GEOM_Annotation.cxx:189
const TCollection_ExtendedString & GetText() const
Returns annotation text string.
Definition: GEOM_Annotation.hxx:90
const gp_Pnt & GetAttachPoint() const
Returns attachment point of extension line.
Definition: GEOM_Annotation.hxx:129
Standard_EXPORT void SetAttachPoint(const gp_Pnt &thePoint)
Sets attachment point of extension line.
Definition: GEOM_Annotation.cxx:207
Standard_Boolean GetAutoHide() const
Returns current state of the auto-hiding option.
Definition: GEOM_Annotation.hxx:197
Standard_EXPORT void SetHilightShape(const TopoDS_Shape &theShape)
Sets shape (annotated shape) that will be used for highlighting.
Definition: GEOM_Annotation.cxx:216
Standard_EXPORT void SetDepthCulling(const Standard_Boolean theToEnable)
Sets special flag that allows disabling depth testing when rendering the graphical presentation.
Definition: GEOM_Annotation.cxx:351
Standard_Boolean GetDepthCulling() const
Returns depth culling state.
Definition: GEOM_Annotation.hxx:214
Standard_Real GetLineWidth() const
Returns line width for drawing the annotation's extension line and underline.
Definition: GEOM_Annotation.hxx:158
Aspect_TypeOfLine GetHiddenLineStyle() const
Retusn style of hidden connection line.
Definition: GEOM_Annotation.hxx:170
Standard_EXPORT void BeginDrag()
Prepares necessary data to perform dragging.
Definition: GEOM_Annotation.cxx:571
void SetHighlightMode(const HighlightMode theMode)
Sets highlight mode used for display of presentation.
Definition: GEOM_Annotation.hxx:201
virtual ~GEOM_Annotation()
Destructor.
Definition: GEOM_Annotation.hxx:83
HighlightMode GetHilightMode() const
Returns highlight mode.
Definition: GEOM_Annotation.hxx:204
Font_FontAspect GetFontAspect() const
Returns label's font aspect.
Definition: GEOM_Annotation.hxx:182
TCollection_ExtendedString myText
Text string of the label presentation.
Definition: GEOM_Annotation.hxx:298
Standard_EXPORT void EndDrag()
Perform necessary update when dragging is finished.
Definition: GEOM_Annotation.cxx:606
Standard_EXPORT void SetLineWidth(const Standard_Real theLineWidth)
Sets line width to be used for drawing the annotation's extension line and underline.
Definition: GEOM_Annotation.cxx:266
Standard_EXPORT void SetLineStyle(const Aspect_TypeOfLine theStyle)
Sets style of connection line.
Definition: GEOM_Annotation.cxx:281
static Standard_EXPORT gp_Pnt GetDefaultPosition(const Standard_Boolean theIsScreenFixed, const gp_Pnt &theAttachPnt, const Standard_Real theOffset, const Handle(V3d_View)&theView)
Returns default position for placing annotation when its attachment point has been determined.
Definition: GEOM_Annotation.cxx:376
HighlightMode myHilightMode
Highlight mode for presentation.
Definition: GEOM_Annotation.hxx:297
static Standard_EXPORT gp_Pnt ConvertPosition2d(const gp_Pnt &thePosition, const gp_Pnt &theAttach, const Handle(V3d_View)&theView)
Converts 3d position to 2d on screen point.
Definition: GEOM_Annotation.cxx:407
virtual void SetTransformPersistence(const Handle(Graphic3d_TransformPers)&) Standard_OVERRIDE
Definition: GEOM_Annotation.hxx:283
Quantity_Color GetTextColor() const
Returns color for the text's label.
Definition: GEOM_Annotation.hxx:146
Standard_EXPORT void Drag(const Standard_Integer theDx, const Standard_Integer theDy, const Handle(V3d_View)&theView)
Drags annotation presentation in the screen plane using the given pixel delta.
Definition: GEOM_Annotation.cxx:580
DEFINE_STANDARD_RTTIEXT(GEOM_Annotation, AIS_InteractiveObject) enum HighlightMode
Enumerates supported highlighting modes.
Definition: GEOM_Annotation.hxx:66
TCollection_AsciiString GetFont() const
Returns font used for drawing the label.
Definition: GEOM_Annotation.hxx:188
TopoDS_Shape myShape
Highlighting shape.
Definition: GEOM_Annotation.hxx:299
const TopoDS_Shape HilightShape() const
Returns the highlighting shape.
Definition: GEOM_Annotation.hxx:135
gp_Pnt myPosition
Position of text label.
Definition: GEOM_Annotation.hxx:292
virtual Standard_EXPORT void SetColor(const Quantity_Color &theColor) Standard_OVERRIDE
Sets color for the presentation.
Definition: GEOM_Annotation.cxx:232
const gp_Pnt & GetPosition() const
Returns position of the annotation text label.
Definition: GEOM_Annotation.hxx:101
Standard_EXPORT void Set2dPosition(const Handle(V3d_View)&theView)
Converts annotation position to screen fixed coordinates and modifies its "2D screen fixed" flag corr...
Definition: GEOM_Annotation.cxx:171
Bnd_Box TextBoundingBox() const
Definition: GEOM_Annotation.cxx:537
Standard_EXPORT void SetTextColor(const Quantity_Color &theColor)
Sets text color.
Definition: GEOM_Annotation.cxx:242
virtual void ComputeSelection(const Handle(SelectMgr_Selection)&theSelection, const Standard_Integer theMode) Standard_OVERRIDE
Definition: GEOM_Annotation.cxx:508
Standard_Real GetTextHeight() const
Returns text's height in pixels.
Definition: GEOM_Annotation.hxx:176
Standard_EXPORT void SetTextHeight(const Standard_Real theHeight)
Sets text height in pixels.
Definition: GEOM_Annotation.cxx:309
Standard_EXPORT void UndoDrag()
Perform necessary update when dragging need undo.
Definition: GEOM_Annotation.cxx:615
Standard_EXPORT void SetPosition(const gp_Pnt &thePosition)
Sets position of the annotation text label.
Definition: GEOM_Annotation.cxx:110
static Standard_EXPORT gp_Pnt ConvertPosition3d(const gp_Pnt &thePosition, const gp_Pnt &theAttach, const Handle(V3d_View)&theView)
Converts 2d position to 3d point.
Definition: GEOM_Annotation.cxx:426
Standard_EXPORT void SetFontAspect(const Font_FontAspect theFontAspect)
Sets font aspect for label.
Definition: GEOM_Annotation.cxx:323
Standard_Boolean GetIsScreenFixed() const
Returns value of "screen fixed" positioning mode.
Definition: GEOM_Annotation.hxx:110
Standard_Boolean myIsDepthCulling
Flag indicating whether the "depth culling" is turned on.
Definition: GEOM_Annotation.hxx:296
Quantity_Color GetLineColor() const
Returns color for the connection line.
Definition: GEOM_Annotation.hxx:152
Definition: GEOM_Annotation.hxx:331
float d
Definition: GEOM_Annotation.hxx:335
float a
Definition: GEOM_Annotation.hxx:334
float x
Definition: GEOM_Annotation.hxx:332
float y
Definition: GEOM_Annotation.hxx:333