Hoops Visualize HPS  version 2018-SP2
Hoops Visualize HPS 3D Rendering Engine
Looking for a senior C++ dev?
I'm looking for work. Hire me!
HPS::TextAttributeControl Class Reference

#include <hps.h>

Inheritance diagram for HPS::TextAttributeControl:
Collaboration diagram for HPS::TextAttributeControl:

Public Member Functions

 TextAttributeControl (SegmentKey &in_seg)
 Initializes a control tied to the segment in_seg. More...
 
 TextAttributeControl (TextAttributeControl const &in_that)
 Initializes a control tied to the same object as in_that. More...
 
 TextAttributeControl (TextAttributeControl &&in_that)
 The move constructor creates a TextAttributeControl by transferring the underlying impl of the rvalue reference to this TextAttributeControl thereby avoiding a copy and allocation. More...
 
TextAttributeControloperator= (TextAttributeControl &&in_that)
 The move assignment operator transfers the underlying impl of the rvalue reference to this TextAttributeControl thereby avoiding a copy. More...
 
 ~TextAttributeControl ()
 Releases a reference to the database object this control is tied to. More...
 
virtual HPS::Type Type () const
 This function returns the true type of the underlying object. More...
 
HPS::Type ObjectType () const
 
TextAttributeControloperator= (TextAttributeControl const &in_that)
 Share the underlying smart-pointer of the TextAttributeControl source. More...
 
TextAttributeControlSetAlignment (Text::Alignment in_align, Text::ReferenceFrame in_ref=Text::ReferenceFrame::WorldAligned, Text::Justification in_justify=Text::Justification::Left)
 Sets the alignment for text. More...
 
TextAttributeControlSetBold (bool in_state)
 Sets whether text should be bold. More...
 
TextAttributeControlSetItalic (bool in_state)
 Sets whether text should be italic. More...
 
TextAttributeControlSetOverline (bool in_state)
 Sets whether an overline should be drawn over text. More...
 
TextAttributeControlSetStrikethrough (bool in_state)
 Sets whether a strikethrough should be drawn through text. More...
 
TextAttributeControlSetUnderline (bool in_state)
 Sets whether an underline should be drawn under text. More...
 
TextAttributeControlSetSlant (float in_angle)
 Sets the slant angle for text. More...
 
TextAttributeControlSetLineSpacing (float in_multiplier)
 Sets the line spacing multiplier for text. More...
 
TextAttributeControlSetRotation (Text::Rotation in_state, float in_angle=0.0f)
 Sets the angle characters should be rotated within text strings. More...
 
TextAttributeControlSetRotation (float in_angle)
 Sets the angle characters should be rotated within text strings. More...
 
TextAttributeControlSetExtraSpace (bool in_state, float in_size=0.0f, Text::SizeUnits in_units=Text::SizeUnits::ObjectSpace)
 Sets the amount of additional space to add between characters in a text string. More...
 
TextAttributeControlSetExtraSpace (float in_size, Text::SizeUnits in_units)
 Sets the amount of additional space to add between characters in a text string. More...
 
TextAttributeControlSetGreeking (bool in_state, float in_size=0.0f, Text::GreekingUnits in_units=Text::GreekingUnits::ObjectSpace, Text::GreekingMode in_mode=Text::GreekingMode::Lines)
 Sets the greeking settings to use for text. More...
 
TextAttributeControlSetGreeking (float in_size, Text::GreekingUnits in_units=Text::GreekingUnits::ObjectSpace, Text::GreekingMode in_mode=Text::GreekingMode::Lines)
 Sets the greeking settings to use for text. More...
 
TextAttributeControlSetSizeTolerance (bool in_state, float in_size=50.0f, Text::SizeToleranceUnits in_units=Text::SizeToleranceUnits::Percent)
 Sets the size tolerance settings to use for text. More...
 
TextAttributeControlSetSizeTolerance (float in_size, Text::SizeToleranceUnits in_units)
 Sets the size tolerance settings to use for text. More...
 
TextAttributeControlSetSize (float in_size, Text::SizeUnits in_units)
 Sets the font size to use for text. More...
 
TextAttributeControlSetFont (char const *in_name)
 Sets the font to use for text. More...
 
TextAttributeControlSetTransform (Text::Transform in_trans)
 Sets the transform behavior for text. More...
 
TextAttributeControlSetRenderer (Text::Renderer in_rend)
 Sets the renderer for text. More...
 
TextAttributeControlSetPreference (Text::Preference in_pref)
 Sets the font type preference for text. More...
 
TextAttributeControlSetPreference (float in_cutoff, Text::SizeUnits in_units, Text::Preference in_smaller, Text::Preference in_larger)
 Sets the preference for text. More...
 
TextAttributeControlSetPath (Vector const &in_path)
 Sets the path for text. More...
 
TextAttributeControlSetSpacing (float in_multiplier)
 Sets the spacing multiplier for text. More...
 
TextAttributeControlSetBackground (bool in_state, char const *in_name)
 Sets the background to be used with text. More...
 
TextAttributeControlSetBackground (char const *in_name)
 Sets the background to be used with text. More...
 
TextAttributeControlSetBackground (bool in_state)
 Sets the background to be used with text. More...
 
TextAttributeControlSetBackgroundMargins (float in_size, Text::MarginUnits in_units=Text::MarginUnits::Percent)
 Sets the amount of additional padding around text strings when backgrounds are used. More...
 
TextAttributeControlSetBackgroundMargins (FloatArray const &in_size, TextMarginUnitsArray const &in_units)
 Sets the amount of additional padding around text strings when backgrounds are used. More...
 
TextAttributeControlSetBackgroundMargins (size_t in_count, float const in_sizes [], HPS::Text::MarginUnits const in_units [])
 Sets the amount of additional padding around text strings when backgrounds are used. More...
 
TextAttributeControlSetBackgroundStyle (char const *in_name)
 Allows specifying a named style to be used in the drawing of text backgrounds. More...
 
TextAttributeControlUnsetAlignment ()
 Removes the alignment setting. More...
 
TextAttributeControlUnsetBold ()
 Removes the bold setting. More...
 
TextAttributeControlUnsetItalic ()
 Removes the italic setting. More...
 
TextAttributeControlUnsetOverline ()
 Removes the overline setting. More...
 
TextAttributeControlUnsetStrikethrough ()
 Removes the strikethrough setting. More...
 
TextAttributeControlUnsetUnderline ()
 Removes the underline setting. More...
 
TextAttributeControlUnsetSlant ()
 Removes the slant setting. More...
 
TextAttributeControlUnsetLineSpacing ()
 Removes the line spacing setting. More...
 
TextAttributeControlUnsetRotation ()
 Removes the rotation setting. More...
 
TextAttributeControlUnsetExtraSpace ()
 Removes the extra space setting. More...
 
TextAttributeControlUnsetGreeking ()
 Removes the greeking setting. More...
 
TextAttributeControlUnsetSizeTolerance ()
 Removes the size tolerance setting. More...
 
TextAttributeControlUnsetSize ()
 Removes the size setting. More...
 
TextAttributeControlUnsetFont ()
 Removes the font setting. More...
 
TextAttributeControlUnsetTransform ()
 Removes the transform setting. More...
 
TextAttributeControlUnsetRenderer ()
 Removes the renderer setting. More...
 
TextAttributeControlUnsetPreference ()
 Removes the preference setting. More...
 
TextAttributeControlUnsetPath ()
 Removes the path setting. More...
 
TextAttributeControlUnsetSpacing ()
 Removes the spacing setting. More...
 
TextAttributeControlUnsetBackground ()
 Removes the background setting. More...
 
TextAttributeControlUnsetBackgroundMargins ()
 Removes the background margin setting. More...
 
TextAttributeControlUnsetBackgroundStyle ()
 Removes the background style setting. More...
 
TextAttributeControlUnsetEverything ()
 Removes all settings from this object. More...
 
bool ShowAlignment (Text::Alignment &out_align, Text::ReferenceFrame &out_ref, Text::Justification &out_justify) const
 Shows the alignment for text. More...
 
bool ShowBold (bool &out_state) const
 Shows whether text should be bold. More...
 
bool ShowItalic (bool &out_state) const
 Shows whether text should be italic. More...
 
bool ShowOverline (bool &out_state) const
 Shows whether an overline should be drawn over text. More...
 
bool ShowStrikethrough (bool &out_state) const
 Shows whether a strikethrough should be drawn through text. More...
 
bool ShowUnderline (bool &out_state) const
 Shows whether an underline should be drawn under text. More...
 
bool ShowSlant (float &out_angle) const
 Shows the slant angle for text. More...
 
bool ShowLineSpacing (float &out_multiplier) const
 Shows the line spacing multiplier for text. More...
 
bool ShowRotation (Text::Rotation &out_rot, float &out_angle) const
 Shows the angle characters should be rotated within text strings. More...
 
bool ShowExtraSpace (bool &out_state, float &out_size, Text::SizeUnits &out_units) const
 Shows the amount of additional space to add between characters in a text string. More...
 
bool ShowGreeking (bool &out_state, float &out_size, Text::GreekingUnits &out_units, Text::GreekingMode &out_mode) const
 Shows the greeking settings to use for text. More...
 
bool ShowSizeTolerance (bool &out_state, float &out_size, Text::SizeToleranceUnits &out_units) const
 Shows the size tolerance settings to use for text. More...
 
bool ShowSize (float &out_size, Text::SizeUnits &out_units) const
 Shows the font size to use for text. More...
 
bool ShowFont (UTF8 &out_name) const
 Shows the font to use for text. More...
 
bool ShowTransform (Text::Transform &out_trans) const
 Shows the transform state for text. More...
 
bool ShowRenderer (Text::Renderer &out_rend) const
 Shows the renderer for text. More...
 
bool ShowPreference (float &out_cutoff, Text::SizeUnits &out_units, Text::Preference &out_smaller, Text::Preference &out_larger) const
 Shows the preference for text. More...
 
bool ShowPath (Vector &out_path) const
 Shows the path for text. More...
 
bool ShowSpacing (float &out_multiplier) const
 Shows the spacing multiplier for text. More...
 
bool ShowBackground (bool &out_state, UTF8 &out_name) const
 Shows the background to be used with text. More...
 
bool ShowBackgroundMargins (FloatArray &out_size, TextMarginUnitsArray &out_units) const
 Shows the amount of additional padding around text strings when backgrounds are used. More...
 
bool ShowBackgroundStyle (UTF8 &out_name) const
 Shows the named style to be used in the drawing of text backgrounds. More...
 
virtual bool Empty () const
 Indicates whether this object has any values set on it. More...
 
virtual void Reset ()
 Resets this object to its initial, uninitialized state. More...
 
bool HasType (HPS::Type in_mask) const
 This function indicates whether this Object has the given Type mask. More...
 
intptr_t GetClassID () const
 Returns a unique identifier that is shared by all objects of the same class. More...
 
intptr_t GetInstanceID () const
 Returns an identifier that can be used to identify which instance of a class an object is. More...
 

Static Public Member Functions

template<typename T >
static intptr_t ClassID ()
 Unique identifier for this class. More...
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::TextAttributeControl
 

Private Member Functions

 TextAttributeControl ()
 Private default constructor to prevent instantiation without a segment. More...
 

Detailed Description

The HPS::TextAttributeControl class is a smart pointer that is tied to a database object. This object gives you access to all the attributes associated with text, such as font, size, and rotation. Text characteristics such as bold, italic, and underline are also accessed through the HPS::TextAttributeControl.

Default values for the various fields of HPS::TextAttributeControl can be found here.

Constructor & Destructor Documentation

◆ TextAttributeControl() [1/4]

HPS::TextAttributeControl::TextAttributeControl ( SegmentKey in_seg)
explicit

Initializes a control tied to the segment in_seg.

◆ TextAttributeControl() [2/4]

HPS::TextAttributeControl::TextAttributeControl ( TextAttributeControl const &  in_that)

Initializes a control tied to the same object as in_that.

◆ TextAttributeControl() [3/4]

HPS::TextAttributeControl::TextAttributeControl ( TextAttributeControl &&  in_that)

The move constructor creates a TextAttributeControl by transferring the underlying impl of the rvalue reference to this TextAttributeControl thereby avoiding a copy and allocation.

Parameters
in_thatAn rvalue reference to a TextAttributeControl to take the impl from.

◆ ~TextAttributeControl()

HPS::TextAttributeControl::~TextAttributeControl ( )

Releases a reference to the database object this control is tied to.

◆ TextAttributeControl() [4/4]

HPS::TextAttributeControl::TextAttributeControl ( )
private

Private default constructor to prevent instantiation without a segment.

Member Function Documentation

◆ ClassID()

template<typename T >
static intptr_t HPS::Object::ClassID ( )
inlinestaticinherited

Unique identifier for this class.

Note: this method uses construction of static objects. If used in a constructor, it should be used in the body not the initializer list.

◆ Empty()

virtual bool HPS::Object::Empty ( ) const
inlinevirtualinherited

Indicates whether this object has any values set on it.

Returns
true if no values are set on this object, false otherwise.

Reimplemented in HPS::STL::ImportResultsKit, HPS::STL::ImportOptionsKit, HPS::OBJ::ImportResultsKit, HPS::OBJ::ImportOptionsKit, HPS::Hardcopy::File::ExportOptionsKit, HPS::Stream::ExportOptionsKit, HPS::Stream::ImportResultsKit, HPS::Stream::ImportOptionsKit, HPS::PointCloud::ImportOptionsKit, HPS::PointCloud::ImportResultsKit, HPS::UpdateOptionsKit, HPS::HighlightSearchOptionsKit, HPS::HighlightOptionsKit, HPS::SelectionOptionsKit, HPS::SearchOptionsKit, HPS::CutGeometryGatheringOptionsKit, HPS::ShapeKit, HPS::ShaderKit, HPS::Shader::ImportOptionsKit, HPS::ImageKit, HPS::Image::ImportOptionsKit, HPS::Image::ExportOptionsKit, HPS::TextureOptionsKit, HPS::LinePatternKit, HPS::LinePatternParallelKit, HPS::LinePatternOptionsKit, HPS::GlyphKit, HPS::ApplicationWindowOptionsKit, HPS::OffScreenWindowOptionsKit, HPS::StandAloneWindowOptionsKit, HPS::GridKit, HPS::PolygonKit, HPS::MeshKit, HPS::ShellKit, HPS::ShellRelationResultsKit, HPS::ShellRelationOptionsKit, HPS::ShellOptimizationOptionsKit, HPS::TextKit, HPS::EllipticalArcKit, HPS::EllipseKit, HPS::TrimKit, HPS::NURBSSurfaceKit, HPS::NURBSCurveKit, HPS::SpotlightKit, HPS::InfiniteLineKit, HPS::CuttingSectionKit, HPS::CircularWedgeKit, HPS::CircularArcKit, HPS::CircleKit, HPS::SphereKit, HPS::CylinderKit, HPS::DistantLightKit, HPS::MarkerKit, HPS::LineKit, HPS::AttributeLockKit, HPS::FontInfoState, HPS::WindowInfoKit, HPS::DebuggingKit, HPS::SubwindowKit, HPS::ContourLineKit, HPS::VisualEffectsKit, HPS::TransformMaskKit, HPS::PostProcessEffectsKit, HPS::DrawingAttributeKit, HPS::HiddenLineAttributeKit, HPS::PerformanceKit, HPS::NURBSSurfaceAttributeKit, HPS::MaterialKit, HPS::MaterialMappingKit, HPS::MatrixKit, HPS::CurveAttributeKit, HPS::EdgeAttributeKit, HPS::LineAttributeKit, HPS::TextAttributeKit, HPS::CuttingSectionAttributeKit, HPS::CylinderAttributeKit, HPS::LightingAttributeKit, HPS::SphereAttributeKit, HPS::MarkerAttributeKit, HPS::CullingKit, HPS::ColorInterpolationKit, HPS::TransparencyKit, HPS::SelectabilityKit, HPS::CameraKit, HPS::VisibilityKit, HPS::BoundingKit, HPS::SegmentOptimizationOptionsKit, HPS::Publish::ExportOptionsKit, HPS::Publish::TextFieldKit, HPS::Publish::SignatureFieldKit, HPS::Publish::DropDownListKit, HPS::Exchange::TessellationOptionsKit, HPS::Publish::ListBoxKit, HPS::Exchange::ExportSTEPOptionsKit, HPS::Exchange::ExportParasolidOptionsKit, HPS::Publish::RadioButtonKit, HPS::Exchange::ExportIGESOptionsKit, HPS::Exchange::ExportXMLOptionsKit, HPS::Publish::CheckBoxKit, HPS::Exchange::ExportU3DOptionsKit, HPS::Exchange::ExportSTLOptionsKit, HPS::Publish::ButtonKit, HPS::Exchange::ExportPRCOptionsKit, HPS::Publish::LinkKit, HPS::Exchange::ExportJTOptionsKit, HPS::Publish::SlideTableKit, HPS::Exchange::ExportACISOptionsKit, HPS::Publish::TableKit, HPS::Exchange::Export3MFOptionsKit, HPS::Publish::ImageKit, HPS::Publish::TextKit, HPS::Exchange::ModelFileImportOptionsKit, HPS::Publish::ViewKit, HPS::Exchange::TranslationOptionsKit, HPS::Publish::ArtworkKit, HPS::Publish::AnnotationKit, HPS::ComponentPath, HPS::Exchange::ImportOptionsKit, HPS::Parasolid::ExportOptionsKit, HPS::Exchange::NURBSConversionOptionsKit, HPS::Parasolid::LineTessellationKit, HPS::Exchange::Configuration, HPS::Publish::PageKit, HPS::Parasolid::FacetTessellationKit, HPS::Publish::DocumentKit, HPS::Parasolid::ImportOptionsKit, HPS::DWG::ImportOptionsKit, HPS::OOC::ImportOptionsKit, HPS::Sketchup::ImportOptionsKit, and HPS::Sketchup::ImportResultsKit.

◆ GetClassID()

intptr_t HPS::Object::GetClassID ( ) const
inherited

Returns a unique identifier that is shared by all objects of the same class.

Returns
A unique value shared by all objects of the same class.

◆ GetInstanceID()

intptr_t HPS::Object::GetInstanceID ( ) const
inherited

Returns an identifier that can be used to identify which instance of a class an object is.

Different keys and controls will return the same value if they are backed by the same database resource.

Returns
A value unique to an instance of an object and all objects that are backed by the same database resource.

◆ HasType()

bool HPS::Object::HasType ( HPS::Type  in_mask) const
inherited

This function indicates whether this Object has the given Type mask.

Parameters
in_maskThe Type mask to check against this Object.
Returns
true if this Object has the given Type mask, false otherwise.

◆ ObjectType()

HPS::Type HPS::TextAttributeControl::ObjectType ( ) const
inlinevirtual

Reimplemented from HPS::Control.

◆ operator=() [1/2]

TextAttributeControl& HPS::TextAttributeControl::operator= ( TextAttributeControl &&  in_that)

The move assignment operator transfers the underlying impl of the rvalue reference to this TextAttributeControl thereby avoiding a copy.

Parameters
in_thatAn rvalue reference to a TextAttributeControl to take the impl from.
Returns
A reference to this TextAttributeControl.

◆ operator=() [2/2]

TextAttributeControl& HPS::TextAttributeControl::operator= ( TextAttributeControl const &  in_that)

Share the underlying smart-pointer of the TextAttributeControl source.

Parameters
in_thatThe TextAttributeControl source of the assignment.
Returns
A reference to this TextAttributeControl.

◆ Reset()

◆ SetAlignment()

TextAttributeControl& HPS::TextAttributeControl::SetAlignment ( Text::Alignment  in_align,
Text::ReferenceFrame  in_ref = Text::ReferenceFrame::WorldAligned,
Text::Justification  in_justify = Text::Justification::Left 
)

Sets the alignment for text.

Parameters
in_alignmentThe alignment for text.
in_reference_frameThe reference frame for text.
in_justificationThe justification for text.
Returns
A reference to this object.

◆ SetBackground() [1/3]

TextAttributeControl& HPS::TextAttributeControl::SetBackground ( bool  in_state,
char const *  in_name 
)

Sets the background to be used with text.

Parameters
in_stateWhether a background is drawn for text.
in_nameThe name of a shape definition.
Returns
A reference to this object.

◆ SetBackground() [2/3]

TextAttributeControl& HPS::TextAttributeControl::SetBackground ( char const *  in_name)

Sets the background to be used with text.

The state is implicitly on.

Parameters
in_nameThe name of a shape definition.
Returns
A reference to this object.

◆ SetBackground() [3/3]

TextAttributeControl& HPS::TextAttributeControl::SetBackground ( bool  in_state)

Sets the background to be used with text.

Parameters
in_stateWhether a background is drawn for text.
Returns
A reference to this object.

◆ SetBackgroundMargins() [1/3]

TextAttributeControl& HPS::TextAttributeControl::SetBackgroundMargins ( float  in_size,
Text::MarginUnits  in_units = Text::MarginUnits::Percent 
)

Sets the amount of additional padding around text strings when backgrounds are used.

Parameters
in_sizeThe size of the margins.
in_unitsThe units of the size.
Returns
A reference to this object.

◆ SetBackgroundMargins() [2/3]

TextAttributeControl& HPS::TextAttributeControl::SetBackgroundMargins ( FloatArray const &  in_size,
TextMarginUnitsArray const &  in_units 
)

Sets the amount of additional padding around text strings when backgrounds are used.

Additional margin values can also be referenced within definitions of background shapes and leader lines.

Parameters
in_sizeThe size of the margins.
in_unitsThe units of the size.
Returns
A reference to this object.

◆ SetBackgroundMargins() [3/3]

TextAttributeControl& HPS::TextAttributeControl::SetBackgroundMargins ( size_t  in_count,
float const  in_sizes[],
HPS::Text::MarginUnits const  in_units[] 
)

Sets the amount of additional padding around text strings when backgrounds are used.

Additional margin values can also be referenced within definitions of background shapes and leader lines.

Parameters
in_countThe number of elements in each array.
in_sizesThe size of the margins.
in_unitsThe units of the size.
Returns
A reference to this object.

◆ SetBackgroundStyle()

TextAttributeControl& HPS::TextAttributeControl::SetBackgroundStyle ( char const *  in_name)

Allows specifying a named style to be used in the drawing of text backgrounds.

If no style is specified, backgrounds inherit the face and edge attributes from the containing segment.

Parameters
in_nameThe name of a style, defined in a portfolio that is accessible.
Returns
A reference to this object.

◆ SetBold()

TextAttributeControl& HPS::TextAttributeControl::SetBold ( bool  in_state)

Sets whether text should be bold.

For fonts which do not have a bold variant, this setting will be ignored.

Parameters
in_stateWhether text should be bold.
Returns
A reference to this object.

◆ SetExtraSpace() [1/2]

TextAttributeControl& HPS::TextAttributeControl::SetExtraSpace ( bool  in_state,
float  in_size = 0.0f,
Text::SizeUnits  in_units = Text::SizeUnits::ObjectSpace 
)

Sets the amount of additional space to add between characters in a text string.

Parameters
in_stateWhether to add additional space between characters in a text string.
in_sizeThe size of the additional space to add between characters.
in_unitsThe units of the size of the additional space to add between characters.
Returns
A reference to this object.

◆ SetExtraSpace() [2/2]

TextAttributeControl& HPS::TextAttributeControl::SetExtraSpace ( float  in_size,
Text::SizeUnits  in_units 
)

Sets the amount of additional space to add between characters in a text string.

This function implicitly enables the addition of extra space.

Parameters
in_sizeThe size of the additional space to add between characters.
in_unitsThe units of the size of the additional space to add between characters.
Returns
A reference to this object.

◆ SetFont()

TextAttributeControl& HPS::TextAttributeControl::SetFont ( char const *  in_name)

Sets the font to use for text.

This must either be a builtin font or a font Visualize can locate in the directories specified by World::SetFontDirectories. If the requested font cannot be found, the stroked font will be used.

Parameters
in_nameUTF8-encoded font name to use for text.
Returns
A reference to this TextKey.
See also
World::SetFontDirectories

◆ SetGreeking() [1/2]

TextAttributeControl& HPS::TextAttributeControl::SetGreeking ( bool  in_state,
float  in_size = 0.0f,
Text::GreekingUnits  in_units = Text::GreekingUnits::ObjectSpace,
Text::GreekingMode  in_mode = Text::GreekingMode::Lines 
)

Sets the greeking settings to use for text.

Parameters
in_stateWhether greeking is enabled for text.
in_sizeThe size below which to draw a simple symbol in place of a character.
in_unitsThe units of the size below which to draw a simple glyph in place of a character.
in_modeThe type of symbol to draw for characters which are smaller than the greeking size.
Returns
A reference to this object.

◆ SetGreeking() [2/2]

TextAttributeControl& HPS::TextAttributeControl::SetGreeking ( float  in_size,
Text::GreekingUnits  in_units = Text::GreekingUnits::ObjectSpace,
Text::GreekingMode  in_mode = Text::GreekingMode::Lines 
)

Sets the greeking settings to use for text.

This function implicitly enables text greeking.

Parameters
in_sizeThe size below which to draw a simple symbol in place of a character.
in_unitsThe units of the size below which to draw a simple glyph in place of a character.
in_modeThe type of symbol to draw for characters which are smaller than the greeking size.
Returns
A reference to this object.

◆ SetItalic()

TextAttributeControl& HPS::TextAttributeControl::SetItalic ( bool  in_state)

Sets whether text should be italic.

For fonts which do not have an italic variant, this setting will be ignored.

Parameters
in_stateWhether text should be italic.
Returns
A reference to this object.

◆ SetLineSpacing()

TextAttributeControl& HPS::TextAttributeControl::SetLineSpacing ( float  in_multiplier)

Sets the line spacing multiplier for text.

This is a multiple of the font size that will be used to determine spacing between lines in multi-line text string.

Parameters
in_multiplierThe line spacing multiplier for text.
Returns
A reference to this object.

◆ SetOverline()

TextAttributeControl& HPS::TextAttributeControl::SetOverline ( bool  in_state)

Sets whether an overline should be drawn over text.

Parameters
in_stateWhether an overline should be drawn over text.
Returns
A reference to this object.

◆ SetPath()

TextAttributeControl& HPS::TextAttributeControl::SetPath ( Vector const &  in_path)

Sets the path for text.

This setting controls the vector along which text strings will be displayed.

Parameters
in_pathThe path for text.
Returns
A reference to this object.

◆ SetPreference() [1/2]

TextAttributeControl& HPS::TextAttributeControl::SetPreference ( Text::Preference  in_pref)

Sets the font type preference for text.

This function implicitly sets the same font type for all text sizes.

Parameters
in_preferenceThe font type preference for text.
Returns
A reference to this object.

◆ SetPreference() [2/2]

TextAttributeControl& HPS::TextAttributeControl::SetPreference ( float  in_cutoff,
Text::SizeUnits  in_units,
Text::Preference  in_smaller,
Text::Preference  in_larger 
)

Sets the preference for text.

This setting controls which font type is used for text for "large" and "small" sizes and the cutoff at which this distinction is made.

Parameters
in_cutoffThe font size below which the smaller preference is used and above which the larger preference is used.
in_unitsThe units for the font size below which the smaller preference is used and above which the larger preference is used.
in_smallerThe font type preference for strings below the cutoff size.
in_largerThe font type preference for strings above the cutoff size.
Returns
A reference to this object.

◆ SetRenderer()

TextAttributeControl& HPS::TextAttributeControl::SetRenderer ( Text::Renderer  in_rend)

Sets the renderer for text.

Parameters
in_rendererThe renderer for text.
Returns
A reference to this object.

◆ SetRotation() [1/2]

TextAttributeControl& HPS::TextAttributeControl::SetRotation ( Text::Rotation  in_state,
float  in_angle = 0.0f 
)

Sets the angle characters should be rotated within text strings.

Parameters
in_stateWhether and how to rotate the characters within text string.
in_angleThe angle in degrees to rotate each character within text strings. This is only relevant if in_state is Text::Rotation::Rotate.
Returns
A reference to this object.

◆ SetRotation() [2/2]

TextAttributeControl& HPS::TextAttributeControl::SetRotation ( float  in_angle)

Sets the angle characters should be rotated within text strings.

This function implicitly sets a rotation state of Text::Rotation::Rotate.

Parameters
in_angleThe angle in degrees to rotate each character within text strings.
Returns
A reference to this object.

◆ SetSize()

TextAttributeControl& HPS::TextAttributeControl::SetSize ( float  in_size,
Text::SizeUnits  in_units 
)

Sets the font size to use for text.

Parameters
in_sizeThe size for text.
in_unitsThe units of the size for text.
Returns
A reference to this object.

◆ SetSizeTolerance() [1/2]

TextAttributeControl& HPS::TextAttributeControl::SetSizeTolerance ( bool  in_state,
float  in_size = 50.0f,
Text::SizeToleranceUnits  in_units = Text::SizeToleranceUnits::Percent 
)

Sets the size tolerance settings to use for text.

These settings control how to render text strings which request a size not available for a bitmap font. If a size tolerance is specified and enabled, Visualize will use the nearest smaller size for the bitmap font within the tolerance in place of the requested size. If a size tolerance is not enabled, Visualize will attempt to scale up the nearest bitmap font size to the requested size. This setting has no effect for True Type or Open Type fonts.

Parameters
in_stateWhether a size tolerance is enabled for text.
in_sizeThe size for the tolerance.
in_unitsThe units of the size for the tolerance.
Returns
A reference to this object.

◆ SetSizeTolerance() [2/2]

TextAttributeControl& HPS::TextAttributeControl::SetSizeTolerance ( float  in_size,
Text::SizeToleranceUnits  in_units 
)

Sets the size tolerance settings to use for text.

These settings control how to render text strings which request a size not available for a bitmap font. If a size tolerance is specified and enabled, Visualize will use the nearest smaller size for the bitmap font within the tolerance in place of the requested size. If a size tolerance is not enabled, Visualize will attempt to scale up the nearest bitmap font size to the requested size. This setting has no effect for True Type or Open Type fonts. This function implicitly enables a size tolerance.

Parameters
in_sizeThe size for the tolerance.
in_unitsThe units of the size for the tolerance.
Returns
A reference to this object.

◆ SetSlant()

TextAttributeControl& HPS::TextAttributeControl::SetSlant ( float  in_angle)

Sets the slant angle for text.

This determines how far the characters in the string are sheared to the left (negative angle) or right (positive angle) relative to the perpendicular.

Parameters
in_angleThe angle in degrees to slant text. This value must be in the range [-75.0f,+75.0f].
Returns
A reference to this object.

◆ SetSpacing()

TextAttributeControl& HPS::TextAttributeControl::SetSpacing ( float  in_multiplier)

Sets the spacing multiplier for text.

This setting controls the spacing between adjacent characters within a string. A value of 0.0f would result in all characters being drawn on top of each other, a value of 1.0f would be the standard spacing between characters, a value of 2.0f would insert twice as much space as would normally be between two characters, and so on.

Parameters
in_multiplierThe spacing multiplier for text.
Returns
A reference to this object.

◆ SetStrikethrough()

TextAttributeControl& HPS::TextAttributeControl::SetStrikethrough ( bool  in_state)

Sets whether a strikethrough should be drawn through text.

Parameters
in_stateWhether a strikethrough should be drawn through text.
Returns
A reference to this object.

◆ SetTransform()

TextAttributeControl& HPS::TextAttributeControl::SetTransform ( Text::Transform  in_trans)

Sets the transform behavior for text.

Parameters
in_transformThe transform behavior for text.
Returns
A reference to this object.

◆ SetUnderline()

TextAttributeControl& HPS::TextAttributeControl::SetUnderline ( bool  in_state)

Sets whether an underline should be drawn under text.

Parameters
in_stateWhether an underline should be drawn under text.
Returns
A reference to this object.

◆ ShowAlignment()

bool HPS::TextAttributeControl::ShowAlignment ( Text::Alignment out_align,
Text::ReferenceFrame out_ref,
Text::Justification out_justify 
) const

Shows the alignment for text.

Parameters
out_alignmentThe alignment for text.
out_reference_frameThe reference frame for text.
out_justificationThe justification for text.
Returns
true if an alignment was set, false otherwise.

◆ ShowBackground()

bool HPS::TextAttributeControl::ShowBackground ( bool &  out_state,
UTF8 out_name 
) const

Shows the background to be used with text.

Parameters
out_stateWhether a background is drawn for text.
out_nameThe name of a shape definition.
Returns
true if a spacing multiplier was set, false otherwise.

◆ ShowBackgroundMargins()

bool HPS::TextAttributeControl::ShowBackgroundMargins ( FloatArray out_size,
TextMarginUnitsArray out_units 
) const

Shows the amount of additional padding around text strings when backgrounds are used.

Parameters
out_sizeThe size of the margins.
out_unitsThe units of the sizes.
Returns
true if a spacing multiplier was set, false otherwise.

◆ ShowBackgroundStyle()

bool HPS::TextAttributeControl::ShowBackgroundStyle ( UTF8 out_name) const

Shows the named style to be used in the drawing of text backgrounds.

Parameters
out_nameThe name of a style, defined in a portfolio that is accessible.
Returns
true if a spacing multiplier was set, false otherwise.

◆ ShowBold()

bool HPS::TextAttributeControl::ShowBold ( bool &  out_state) const

Shows whether text should be bold.

Parameters
out_stateWhether text should be bold.
Returns
true if a bold setting was set, false otherwise.

◆ ShowExtraSpace()

bool HPS::TextAttributeControl::ShowExtraSpace ( bool &  out_state,
float &  out_size,
Text::SizeUnits out_units 
) const

Shows the amount of additional space to add between characters in a text string.

Parameters
out_stateWhether to add additional space between characters in a text string.
out_sizeThe size of the additional space to add between characters.
out_unitsThe units of the size of the additional space to add between characters.
Returns
true if an extra space setting was set, false otherwise.

◆ ShowFont()

bool HPS::TextAttributeControl::ShowFont ( UTF8 out_name) const

Shows the font to use for text.

Parameters
out_nameUTF8-encoded font name to use for text.
Returns
true if a font was set, false otherwise.

◆ ShowGreeking()

bool HPS::TextAttributeControl::ShowGreeking ( bool &  out_state,
float &  out_size,
Text::GreekingUnits out_units,
Text::GreekingMode out_mode 
) const

Shows the greeking settings to use for text.

Parameters
out_stateWhether greeking is enabled for text.
out_sizeThe size below which to draw a simple symbol in place of a character.
out_unitsThe units of the size below which to draw a simple glyph in place of a character.
out_modeThe type of symbol to draw for characters which are smaller than the greeking size.
Returns
true if greeking settings were set, false otherwise.

◆ ShowItalic()

bool HPS::TextAttributeControl::ShowItalic ( bool &  out_state) const

Shows whether text should be italic.

Parameters
out_stateWhether text should be italic.
Returns
true if an italic setting was set, false otherwise.

◆ ShowLineSpacing()

bool HPS::TextAttributeControl::ShowLineSpacing ( float &  out_multiplier) const

Shows the line spacing multiplier for text.

Parameters
out_multiplierThe line spacing multiplier for text.
Returns
true if a line space multiplier was set, false otherwise.

◆ ShowOverline()

bool HPS::TextAttributeControl::ShowOverline ( bool &  out_state) const

Shows whether an overline should be drawn over text.

Parameters
out_stateWhether an overline should be drawn over text.
Returns
true if an overline setting was set, false otherwise.

◆ ShowPath()

bool HPS::TextAttributeControl::ShowPath ( Vector out_path) const

Shows the path for text.

Parameters
out_pathThe path for text.
Returns
true if a path was set, false otherwise.

◆ ShowPreference()

bool HPS::TextAttributeControl::ShowPreference ( float &  out_cutoff,
Text::SizeUnits out_units,
Text::Preference out_smaller,
Text::Preference out_larger 
) const

Shows the preference for text.

Parameters
out_cutoffThe font size below which the smaller preference is used and above which the larger preference is used.
out_unitsThe units for the font size below which the smaller preference is used and above which the larger preference is used.
out_smallerThe font type preference for strings below the cutoff size.
out_largerThe font type preference for strings above the cutoff size.
Returns
true if a preference was set, false otherwise.

◆ ShowRenderer()

bool HPS::TextAttributeControl::ShowRenderer ( Text::Renderer out_rend) const

Shows the renderer for text.

Parameters
in_rendererThe renderer for text.
Returns
true if a renderer was set, false otherwise.

◆ ShowRotation()

bool HPS::TextAttributeControl::ShowRotation ( Text::Rotation out_rot,
float &  out_angle 
) const

Shows the angle characters should be rotated within text strings.

Parameters
out_rotWhether to rotate the characters within text strings, and if so, what the angle should be measured with repect to.
out_angleThe angle in degrees to rotate each character within text strings.
Returns
true if a rotation setting was set, false otherwise.

◆ ShowSize()

bool HPS::TextAttributeControl::ShowSize ( float &  out_size,
Text::SizeUnits out_units 
) const

Shows the font size to use for text.

Parameters
out_sizeThe size for text.
out_unitsThe units of the size for text.
Returns
true if a size was set, false otherwise.

◆ ShowSizeTolerance()

bool HPS::TextAttributeControl::ShowSizeTolerance ( bool &  out_state,
float &  out_size,
Text::SizeToleranceUnits out_units 
) const

Shows the size tolerance settings to use for text.

Parameters
out_stateWhether a size tolerance is enabled for text.
out_sizeThe size for the tolerance.
out_unitsThe units of the size for the tolerance.
Returns
true if a size tolerance was set, false otherwise.

◆ ShowSlant()

bool HPS::TextAttributeControl::ShowSlant ( float &  out_angle) const

Shows the slant angle for text.

Parameters
out_angleThe angle in degrees to slant text.
Returns
true if a slang angle was set, false otherwise.

◆ ShowSpacing()

bool HPS::TextAttributeControl::ShowSpacing ( float &  out_multiplier) const

Shows the spacing multiplier for text.

Parameters
out_multiplierThe spacing multiplier for text.
Returns
true if a spacing multiplier was set, false otherwise.

◆ ShowStrikethrough()

bool HPS::TextAttributeControl::ShowStrikethrough ( bool &  out_state) const

Shows whether a strikethrough should be drawn through text.

Parameters
out_stateWhether a strikethrough should be drawn through text.
Returns
true if a strikethrough setting was set, false otherwise.

◆ ShowTransform()

bool HPS::TextAttributeControl::ShowTransform ( Text::Transform out_trans) const

Shows the transform state for text.

Parameters
out_transformThe transform state for text.
Returns
true if a transform state was set, false otherwise.

◆ ShowUnderline()

bool HPS::TextAttributeControl::ShowUnderline ( bool &  out_state) const

Shows whether an underline should be drawn under text.

Parameters
out_stateWhether an underline should be drawn under text.
Returns
true if an underline setting was set, false otherwise.

◆ Type()

virtual HPS::Type HPS::TextAttributeControl::Type ( ) const
inlinevirtual

This function returns the true type of the underlying object.

This function is useful for finding the type of smart pointer objects that have been cast to more generic types.

Returns
The true type of the object in question.

Reimplemented from HPS::Control.

◆ UnsetAlignment()

TextAttributeControl& HPS::TextAttributeControl::UnsetAlignment ( )

Removes the alignment setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetBackground()

TextAttributeControl& HPS::TextAttributeControl::UnsetBackground ( )

Removes the background setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetBackgroundMargins()

TextAttributeControl& HPS::TextAttributeControl::UnsetBackgroundMargins ( )

Removes the background margin setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetBackgroundStyle()

TextAttributeControl& HPS::TextAttributeControl::UnsetBackgroundStyle ( )

Removes the background style setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetBold()

TextAttributeControl& HPS::TextAttributeControl::UnsetBold ( )

Removes the bold setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetEverything()

TextAttributeControl& HPS::TextAttributeControl::UnsetEverything ( )

Removes all settings from this object.

If the control is attached to a WindowKey this function restores the default settings of this control as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetExtraSpace()

TextAttributeControl& HPS::TextAttributeControl::UnsetExtraSpace ( )

Removes the extra space setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetFont()

TextAttributeControl& HPS::TextAttributeControl::UnsetFont ( )

Removes the font setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetGreeking()

TextAttributeControl& HPS::TextAttributeControl::UnsetGreeking ( )

Removes the greeking setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetItalic()

TextAttributeControl& HPS::TextAttributeControl::UnsetItalic ( )

Removes the italic setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetLineSpacing()

TextAttributeControl& HPS::TextAttributeControl::UnsetLineSpacing ( )

Removes the line spacing setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetOverline()

TextAttributeControl& HPS::TextAttributeControl::UnsetOverline ( )

Removes the overline setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetPath()

TextAttributeControl& HPS::TextAttributeControl::UnsetPath ( )

Removes the path setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetPreference()

TextAttributeControl& HPS::TextAttributeControl::UnsetPreference ( )

Removes the preference setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetRenderer()

TextAttributeControl& HPS::TextAttributeControl::UnsetRenderer ( )

Removes the renderer setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetRotation()

TextAttributeControl& HPS::TextAttributeControl::UnsetRotation ( )

Removes the rotation setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetSize()

TextAttributeControl& HPS::TextAttributeControl::UnsetSize ( )

Removes the size setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetSizeTolerance()

TextAttributeControl& HPS::TextAttributeControl::UnsetSizeTolerance ( )

Removes the size tolerance setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetSlant()

TextAttributeControl& HPS::TextAttributeControl::UnsetSlant ( )

Removes the slant setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetSpacing()

TextAttributeControl& HPS::TextAttributeControl::UnsetSpacing ( )

Removes the spacing setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetStrikethrough()

TextAttributeControl& HPS::TextAttributeControl::UnsetStrikethrough ( )

Removes the strikethrough setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetTransform()

TextAttributeControl& HPS::TextAttributeControl::UnsetTransform ( )

Removes the transform setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetUnderline()

TextAttributeControl& HPS::TextAttributeControl::UnsetUnderline ( )

Removes the underline setting.

If the control is attached to a WindowKey this function restores the default value of this setting as specified by TextAttributeKit::GetDefault().

Returns
A reference to this object.

Member Data Documentation

◆ staticType

const HPS::Type HPS::TextAttributeControl::staticType = HPS::Type::TextAttributeControl
static

The documentation for this class was generated from the following file: