Open CASCADE Technology
6.5.4
|
Creates and updates a group of attributes for
text primitives. This group contains the colour,
font, expansion factor (height/width ratio), and
inter-character space.
NOTE: The font name is stored in the aspect instance
so it is safe to pass it as const char* to OpenGl package
without copying the string. However, the aspect should not
be deleted until the text drawn using this aspect is no longer
visible. The best practice is to keep the aspect in the object's drawer.
#include <Graphic3d_AspectText3d.hxx>
Public Member Functions | |
Graphic3d_AspectText3d () | |
Creates a context table for text primitives defined with the following default values: Colour : NOC_YELLOW Font : NOF_ASCII_MONO Expansion factor : 1. Space between characters : 0. The style : TOST_NORMAL The display type : TODT_NORMAL | |
Graphic3d_AspectText3d (const Quantity_Color &AColor, const Standard_CString AFont, const Standard_Real AExpansionFactor, const Standard_Real ASpace, const Aspect_TypeOfStyleText AStyle=Aspect_TOST_NORMAL, const Aspect_TypeOfDisplayText ADisplayType=Aspect_TODT_NORMAL) | |
Creates a context table for text primitives defined with the specified values. AFont may be to take means from User(example "Courier New") or Font described in OpenGl_FontName(example Graphic3d_NOF_ASCII_MONO) or use default font("Courier") | |
void | SetColor (const Quantity_Color &AColor) |
Modifies the colour of <me>. | |
void | SetExpansionFactor (const Standard_Real AFactor) |
Modifies the expansion factor (height/width ratio) If the factor is less than 1, the characters will be higher than they are wide. | |
void | SetFont (const Standard_CString AFont) |
Modifies the font of <me>. | |
void | SetSpace (const Standard_Real ASpace) |
Modifies the space between the characters. | |
void | SetStyle (const Aspect_TypeOfStyleText AStyle) |
Modifies the style of the text. TOST_NORMAL Default text. The text is displayed like any other graphic object. This text can be hidden by another object that is nearest from the point of view. TOST_ANNOTATION The text is always visible. The texte is displayed over the other object according to the priority. | |
void | SetDisplayType (const Aspect_TypeOfDisplayText ADisplayType) |
Define the display type of the text. TODT_NORMAL Default display. Text only. TODT_SUBTITLE There is a subtitle under the text. TODT_DEKALE The text is displayed with a 3D style. TODT_BLEND The text is displayed in XOR. | |
void | SetColorSubTitle (const Quantity_Color &AColor) |
Modifies the colour of the subtitle for the TODT_SUBTITLE TextDisplayType and the colour of backgroubd for the TODT_DEKALE TextDisplayType. | |
void | SetTextZoomable (const Standard_Boolean AFlag) |
Turns usage of text zoomable on/off | |
Standard_Boolean | GetTextZoomable () const |
Returns TRUE when the Text Zoomable is on. | |
void | SetTextAngle (const Standard_Real AAngle) |
Turns usage of text rotated | |
Standard_Real | GetTextAngle () const |
Returns Angle of degree | |
void | SetTextFontAspect (const Font_FontAspect AFontAspect) |
Turns usage of Aspect text | |
Font_FontAspect | GetTextFontAspect () const |
Returns text FontAspect | |
void | Values (Quantity_Color &AColor, Standard_CString &AFont, Standard_Real &AnExpansionFactor, Standard_Real &ASpace) const |
Returns the current values of the group <me>. | |
void | Values (Quantity_Color &AColor, Standard_CString &AFont, Standard_Real &AnExpansionFactor, Standard_Real &ASpace, Aspect_TypeOfStyleText &AStyle, Aspect_TypeOfDisplayText &ADisplayType, Quantity_Color &AColorSubTitle) const |
Returns the current values of the group <me>. | |
void | Values (Quantity_Color &AColor, Standard_CString &AFont, Standard_Real &AnExpansionFactor, Standard_Real &ASpace, Aspect_TypeOfStyleText &AStyle, Aspect_TypeOfDisplayText &ADisplayType, Quantity_Color &AColorSubTitle, Standard_Boolean &ATextZoomable, Standard_Real &ATextAngle) const |
Returns the current values of the group <me>. | |
void | Values (Quantity_Color &AColor, Standard_CString &AFont, Standard_Real &AnExpansionFactor, Standard_Real &ASpace, Aspect_TypeOfStyleText &AStyle, Aspect_TypeOfDisplayText &ADisplayType, Quantity_Color &AColorSubTitle, Standard_Boolean &ATextZoomable, Standard_Real &ATextAngle, Font_FontAspect &ATextFontAspect) const |
Returns the current values of the group <me>. |
Graphic3d_AspectText3d::Graphic3d_AspectText3d | ( | const Quantity_Color & | AColor, |
const Standard_CString | AFont, | ||
const Standard_Real | AExpansionFactor, | ||
const Standard_Real | ASpace, | ||
const Aspect_TypeOfStyleText | AStyle = Aspect_TOST_NORMAL , |
||
const Aspect_TypeOfDisplayText | ADisplayType = Aspect_TODT_NORMAL |
||
) |
void Graphic3d_AspectText3d::SetColor | ( | const Quantity_Color & | AColor | ) |
void Graphic3d_AspectText3d::SetDisplayType | ( | const Aspect_TypeOfDisplayText | ADisplayType | ) |
void Graphic3d_AspectText3d::SetTextFontAspect | ( | const Font_FontAspect | AFontAspect | ) |
void Graphic3d_AspectText3d::Values | ( | Quantity_Color & | AColor, |
Standard_CString & | AFont, | ||
Standard_Real & | AnExpansionFactor, | ||
Standard_Real & | ASpace | ||
) | const |
void Graphic3d_AspectText3d::Values | ( | Quantity_Color & | AColor, |
Standard_CString & | AFont, | ||
Standard_Real & | AnExpansionFactor, | ||
Standard_Real & | ASpace, | ||
Aspect_TypeOfStyleText & | AStyle, | ||
Aspect_TypeOfDisplayText & | ADisplayType, | ||
Quantity_Color & | AColorSubTitle | ||
) | const |
void Graphic3d_AspectText3d::Values | ( | Quantity_Color & | AColor, |
Standard_CString & | AFont, | ||
Standard_Real & | AnExpansionFactor, | ||
Standard_Real & | ASpace, | ||
Aspect_TypeOfStyleText & | AStyle, | ||
Aspect_TypeOfDisplayText & | ADisplayType, | ||
Quantity_Color & | AColorSubTitle, | ||
Standard_Boolean & | ATextZoomable, | ||
Standard_Real & | ATextAngle | ||
) | const |
void Graphic3d_AspectText3d::Values | ( | Quantity_Color & | AColor, |
Standard_CString & | AFont, | ||
Standard_Real & | AnExpansionFactor, | ||
Standard_Real & | ASpace, | ||
Aspect_TypeOfStyleText & | AStyle, | ||
Aspect_TypeOfDisplayText & | ADisplayType, | ||
Quantity_Color & | AColorSubTitle, | ||
Standard_Boolean & | ATextZoomable, | ||
Standard_Real & | ATextAngle, | ||
Font_FontAspect & | ATextFontAspect | ||
) | const |