1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0029570: Visualization, Graphic3d_Aspect - merge Graphic3d_Group aspects

Graphic3d_AspectFillArea3d, Graphic3d_AspectLine3d, Graphic3d_AspectMarker3d
and Graphic3d_AspectText3d have been merged into new class Graphic3d_Aspects.
The old classes are preserved as dummy sub-classes of Graphic3d_Aspects
preserving different per-aspect defaults.

Methods IsGroupPrimitivesAspectSet(), GroupPrimitivesAspect(), FillAreaAspect(),
LineAspect() and MarkerAspect() have been removed from Graphic3d_Group.
Instead, a new method Graphic3d_Group::ReplaceAspects() has been introduced
for replacing existing group aspects.

AIS_Shape now uses new method AIS_InteractiveObject::replaceAspects()
for updating computed groups with new aspects without presentation recomputation
in places where SynchronizeAspects() is not applicable.

OpenGl_AspectFace, OpenGl_AspectLine, OpenGl_AspectMarker
and OpenGl_AspectText have been merged into new class OpenGl_Aspects.

ViewerTest::parseColor() - fix uninitialized alpha component.
Graphic3d_AspectText3d/Prs3d_TextAspect - removed unused properties Space, ExpansionFactor, Angle.
Remove getters Values() deprecated since OCCT 7.1.0.
This commit is contained in:
kgv
2019-03-03 21:07:55 +03:00
committed by apn
parent e08a9b0302
commit bf5f0ca20a
86 changed files with 2275 additions and 3412 deletions

View File

@@ -26,7 +26,6 @@ IMPLEMENT_STANDARD_RTTIEXT(Prs3d_TextAspect, Prs3d_BasicAspect)
// =======================================================================
Prs3d_TextAspect::Prs3d_TextAspect()
: myTextAspect (new Graphic3d_AspectText3d (Quantity_Color (Quantity_NOC_YELLOW), Font_NOF_ASCII_TRIPLEX, 1.0, 0.0)),
myAngle (0.0),
myHeight(16.0),
myHorizontalJustification (Graphic3d_HTA_LEFT),
myVerticalJustification (Graphic3d_VTA_BOTTOM),
@@ -41,7 +40,6 @@ Prs3d_TextAspect::Prs3d_TextAspect()
// =======================================================================
Prs3d_TextAspect::Prs3d_TextAspect (const Handle(Graphic3d_AspectText3d)& theAspect)
: myTextAspect (theAspect),
myAngle (0.0),
myHeight(16.0),
myHorizontalJustification (Graphic3d_HTA_LEFT),
myVerticalJustification (Graphic3d_VTA_BOTTOM),

View File

@@ -39,24 +39,18 @@ public:
//! Sets the font used in text display.
void SetFont (const Standard_CString theFont) { myTextAspect->SetFont (theFont); }
//! Returns the height-width ratio, also known as the expansion factor.
void SetHeightWidthRatio (const Standard_Real theRatio) { myTextAspect->SetExpansionFactor (theRatio); }
//! Sets the length of the box which text will occupy.
void SetSpace (const Standard_Real theSpace) { myTextAspect->SetSpace (theSpace); }
//! Sets the height of the text.
void SetHeight (const Standard_Real theHeight) { myHeight = theHeight; }
//! Sets the angle
void SetAngle (const Standard_Real theAngle) { myAngle = theAngle; }
void SetAngle (const Standard_Real theAngle) { myTextAspect->SetTextAngle (theAngle); }
//! Returns the height of the text box.
Standard_Real Height() const { return myHeight; }
//! Returns the angle
Standard_Real Angle() const { return myAngle; }
Standard_Real Angle() const { return myTextAspect->GetTextAngle(); }
//! Sets horizontal alignment of text.
void SetHorizontalJustification (const Graphic3d_HorizontalTextAlignment theJustification) { myHorizontalJustification = theJustification; }
@@ -106,7 +100,6 @@ public:
protected:
Handle(Graphic3d_AspectText3d) myTextAspect;
Standard_Real myAngle;
Standard_Real myHeight;
Graphic3d_HorizontalTextAlignment myHorizontalJustification;
Graphic3d_VerticalTextAlignment myVerticalJustification;