mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0030857: Visualization - using one implementation of Text in graphic group
Graphic3d_Group::Text(...) are obsolete, AddText() should be used instead of these methods. Graphic3d_Text is a new class for parameters necessary to fill OpenGl_Text. All parameters of Graphic3d_Group::Text() are moved into this class. OpenGl_TextParam is removed, these fields were moved into Graphic3d_Text. OpenGl_Text constructors/Init with OpenGl_TextParam parameter were removed. Constructor with Graphic3d_Text should be used instead of it. Using OpenGl_Text Init() with OpenGl_TextParam should be now replaced on two cases. The first case is setting values into Graphic3d_Text and the second case is calling Reset() after. As example, look at modification in OpenGl_FrameStatsPrs.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include <Graphic3d_ArrayOfPoints.hxx>
|
||||
#include <Graphic3d_AspectMarker3d.hxx>
|
||||
#include <Graphic3d_AspectText3d.hxx>
|
||||
#include <Graphic3d_Text.hxx>
|
||||
#include <Graphic3d_Group.hxx>
|
||||
#include <Graphic3d_Vertex.hxx>
|
||||
#include <MeshVS_Buffer.hxx>
|
||||
@@ -251,8 +252,11 @@ void MeshVS_TextPrsBuilder::Build ( const Handle(Prs3d_Presentation)& Prs,
|
||||
}
|
||||
|
||||
aPnts.Append (Graphic3d_Vec3 ((float )X, (float )Y, (float )Z));
|
||||
Graphic3d_Vertex aPoint (X, Y, Z);
|
||||
aTextGroup->Text (aStr.ToCString(), aPoint, aHeight);
|
||||
|
||||
Handle(Graphic3d_Text) aText = new Graphic3d_Text ((Standard_ShortReal)aHeight);
|
||||
aText->SetText (aStr);
|
||||
aText->SetPosition (gp_Pnt (X, Y, Z));
|
||||
aTextGroup->AddText(aText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user