#include <hps.h>
Static Public Member Functions | |
static TextAttributeKit | GetDefault () |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
The HPS::TextAttributeKit class is a user space object, useful for carrying a group attribute settings. Calling HPS::TextAttributeKit::GetDefault() will return a kit with values found in this table.
HPS::TextAttributeKit::TextAttributeKit | ( | ) |
Initializes an empty kit.
HPS::TextAttributeKit::TextAttributeKit | ( | TextAttributeKit const & | in_kit | ) |
The copy constructor creates a new TextAttributeKit object that contains the same settings as the source object.
in_kit | The source object to copy. |
HPS::TextAttributeKit::TextAttributeKit | ( | TextAttributeKit && | in_that | ) |
The move constructor creates a TextAttributeKit by transferring the underlying impl of the rvalue reference to this TextAttributeKit thereby avoiding a copy and allocation.
in_that | An rvalue reference to a TextAttributeKit to take the impl from. |
|
virtual |
Destroy this kit.
|
virtual |
Indicates whether this object has any values set on it.
Reimplemented from HPS::Object.
bool HPS::TextAttributeKit::Equals | ( | TextAttributeKit const & | in_kit | ) | const |
Check if the source TextAttributeKit is equivalent to this object.
in_kit | The source TextAttributeKit to compare to this object. |
|
static |
Creates a TextAttributeKit which contains the default settings. The returned object will not necessarily have values set for every option, but it will have settings for those options where it is reasonable to have a default.
|
inlinevirtual |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.
Reimplemented from HPS::Object.
bool HPS::TextAttributeKit::operator!= | ( | TextAttributeKit const & | in_kit | ) | const |
Check if the source TextAttributeKit is not equivalent to this object.
in_kit | The source TextAttributeKit to compare to this object. |
TextAttributeKit& HPS::TextAttributeKit::operator= | ( | TextAttributeKit && | in_that | ) |
The move assignment operator transfers the underlying impl of the rvalue reference to this TextAttributeKit thereby avoiding a copy.
in_that | An rvalue reference to a TextAttributeKit to take the impl from. |
TextAttributeKit& HPS::TextAttributeKit::operator= | ( | TextAttributeKit const & | in_kit | ) |
Copies the source TextAttributeKit into this object.
in_kit | The source TextAttributeKit to copy. |
bool HPS::TextAttributeKit::operator== | ( | TextAttributeKit const & | in_kit | ) | const |
Check if the source TextAttributeKit is equivalent to this object.
in_kit | The source TextAttributeKit to compare to this object. |
void HPS::TextAttributeKit::Set | ( | TextAttributeKit const & | in_kit | ) |
Copies all settings from the source TextAttributeKit into this object.
in_kit | The source TextAttributeKit to copy. |
TextAttributeKit& HPS::TextAttributeKit::SetAlignment | ( | Text::Alignment | in_align, |
Text::ReferenceFrame | in_ref = Text::ReferenceFrame::WorldAligned , |
||
Text::Justification | in_justify = Text::Justification::LeftJustified |
||
) |
Sets the alignment for text.
in_alignment | The alignment for text. |
in_reference_frame | The reference frame for text. |
in_justification | The justification for text. |
TextAttributeKit& HPS::TextAttributeKit::SetBold | ( | bool | in_state | ) |
Sets whether text should be bold. For fonts which do not have a bold variant, this setting will be ignored.
in_state | Whether text should be bold. |
TextAttributeKit& HPS::TextAttributeKit::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.
in_state | Whether to add additional space between characters in a text string. |
in_size | The size of the additional space to add between characters. |
in_units | The units of the size of the additional space to add between characters. |
TextAttributeKit& HPS::TextAttributeKit::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.
in_size | The size of the additional space to add between characters. |
in_units | The units of the size of the additional space to add between characters. |
TextAttributeKit& HPS::TextAttributeKit::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.
in_name | UTF8-encoded font name to use for text. |
TextAttributeKit& HPS::TextAttributeKit::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.
in_state | Whether greeking is enabled for text. |
in_size | The size below which to draw a simple symbol in place of a character. |
in_units | The units of the size below which to draw a simple glyph in place of a character. |
in_mode | The type of symbol to draw for characters which are smaller than the greeking size. |
TextAttributeKit& HPS::TextAttributeKit::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.
in_size | The size below which to draw a simple symbol in place of a character. |
in_units | The units of the size below which to draw a simple glyph in place of a character. |
in_mode | The type of symbol to draw for characters which are smaller than the greeking size. |
TextAttributeKit& HPS::TextAttributeKit::SetItalic | ( | bool | in_state | ) |
Sets whether text should be italic. For fonts which do not have an italic variant, this setting will be ignored.
in_state | Whether text should be italic. |
TextAttributeKit& HPS::TextAttributeKit::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.
in_multiplier | The line spacing multiplier for text. |
TextAttributeKit& HPS::TextAttributeKit::SetOverline | ( | bool | in_state | ) |
Sets whether an overline should be drawn over text.
in_state | Whether an overline should be drawn over text. |
TextAttributeKit& HPS::TextAttributeKit::SetPath | ( | Vector const & | in_path | ) |
Sets the path for text. This setting controls the vector along which text strings will be displayed.
in_path | The path for text. |
TextAttributeKit& HPS::TextAttributeKit::SetPreference | ( | Text::Preference | in_pref | ) |
Sets the font type preference for text. This function implicitly sets the same font type for all text sizes.
in_preference | The font type preference for text. |
TextAttributeKit& HPS::TextAttributeKit::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.
in_cutoff | The font size below which the smaller preference is used and above which the larger preference is used. |
in_units | The units for the font size below which the smaller preference is used and above which the larger preference is used. |
in_smaller | The font type preference for strings below the cutoff size. |
in_larger | The font type preference for strings above the cutoff size. |
TextAttributeKit& HPS::TextAttributeKit::SetRenderer | ( | Text::Renderer | in_rend | ) |
Sets the renderer for text.
in_renderer | The renderer for text. |
TextAttributeKit& HPS::TextAttributeKit::SetRotation | ( | Text::Rotation | in_state, |
float | in_angle = 0.0f |
||
) |
Sets the angle characters should be rotated within text strings.
in_state | Whether and how to rotate the characters within text string. |
in_angle | The angle in degrees to rotate each character within text strings. This is only relevant if in_state is Text::Rotation::Rotate. |
TextAttributeKit& HPS::TextAttributeKit::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.
in_angle | The angle in degrees to rotate each character within text strings. |
TextAttributeKit& HPS::TextAttributeKit::SetSize | ( | float | in_size, |
Text::SizeUnits | in_units | ||
) |
Sets the font size to use for text.
in_size | The size for text. |
in_units | The units of the size for text. |
TextAttributeKit& HPS::TextAttributeKit::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.
in_state | Whether a size tolerance is enabled for text. |
in_size | The size for the tolerance. |
in_units | The units of the size for the tolerance. |
TextAttributeKit& HPS::TextAttributeKit::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.
in_size | The size for the tolerance. |
in_units | The units of the size for the tolerance. |
TextAttributeKit& HPS::TextAttributeKit::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.
in_angle | The angle in degrees to slant text. This value must be in the range [-75.0f,+75.0f]. |
TextAttributeKit& HPS::TextAttributeKit::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.
in_multiplier | The spacing multiplier for text. |
TextAttributeKit& HPS::TextAttributeKit::SetStrikethrough | ( | bool | in_state | ) |
Sets whether a strikethrough should be drawn through text.
in_state | Whether a strikethrough should be drawn through text. |
TextAttributeKit& HPS::TextAttributeKit::SetTransform | ( | Text::Transform | in_trans | ) |
Sets the transform behavior for text.
in_transform | The transform behavior for text. |
TextAttributeKit& HPS::TextAttributeKit::SetUnderline | ( | bool | in_state | ) |
Sets whether an underline should be drawn under text.
in_state | Whether an underline should be drawn under text. |
void HPS::TextAttributeKit::Show | ( | TextAttributeKit & | out_kit | ) | const |
Copies all settings from this TextAttributeKit into the given TextAttributeKit.
out_kit | The TextAttributeKit to populate with the contents of this object. |
bool HPS::TextAttributeKit::ShowAlignment | ( | Text::Alignment & | out_align, |
Text::ReferenceFrame & | out_ref, | ||
Text::Justification & | out_justify | ||
) | const |
Shows the alignment for text.
out_alignment | The alignment for text. |
out_reference_frame | The reference frame for text. |
out_justification | The justification for text. |
bool HPS::TextAttributeKit::ShowBold | ( | bool & | out_state | ) | const |
Shows whether text should be bold.
out_state | Whether text should be bold. |
bool HPS::TextAttributeKit::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.
out_state | Whether to add additional space between characters in a text string. |
out_size | The size of the additional space to add between characters. |
out_units | The units of the size of the additional space to add between characters. |
bool HPS::TextAttributeKit::ShowFont | ( | UTF8 & | out_name | ) | const |
Shows the font to use for text.
out_name | UTF8-encoded font name to use for text. |
bool HPS::TextAttributeKit::ShowGreeking | ( | bool & | out_state, |
float & | out_size, | ||
Text::GreekingUnits & | out_units, | ||
Text::GreekingMode & | out_mode | ||
) | const |
Shows the greeking settings to use for text.
out_state | Whether greeking is enabled for text. |
out_size | The size below which to draw a simple symbol in place of a character. |
out_units | The units of the size below which to draw a simple glyph in place of a character. |
out_mode | The type of symbol to draw for characters which are smaller than the greeking size. |
bool HPS::TextAttributeKit::ShowItalic | ( | bool & | out_state | ) | const |
Shows whether text should be italic.
out_state | Whether text should be italic. |
bool HPS::TextAttributeKit::ShowLineSpacing | ( | float & | out_multiplier | ) | const |
Shows the line spacing multiplier for text.
out_multiplier | The line spacing multiplier for text. |
bool HPS::TextAttributeKit::ShowOverline | ( | bool & | out_state | ) | const |
Shows whether an overline should be drawn over text.
out_state | Whether an overline should be drawn over text. |
bool HPS::TextAttributeKit::ShowPath | ( | Vector & | out_path | ) | const |
Shows the path for text.
out_path | The path for text. |
bool HPS::TextAttributeKit::ShowPreference | ( | float & | out_cutoff, |
Text::SizeUnits & | out_units, | ||
Text::Preference & | out_smaller, | ||
Text::Preference & | out_larger | ||
) | const |
Shows the preference for text.
out_cutoff | The font size below which the smaller preference is used and above which the larger preference is used. |
out_units | The units for the font size below which the smaller preference is used and above which the larger preference is used. |
out_smaller | The font type preference for strings below the cutoff size. |
out_larger | The font type preference for strings above the cutoff size. |
bool HPS::TextAttributeKit::ShowRenderer | ( | Text::Renderer & | out_rend | ) | const |
Shows the renderer for text.
in_renderer | The renderer for text. |
bool HPS::TextAttributeKit::ShowRotation | ( | Text::Rotation & | out_rot, |
float & | out_angle | ||
) | const |
Shows the angle characters should be rotated within text strings.
out_rot | Whether to rotate the characters within text strings, and if so, what the angle should be measured with repect to. |
out_angle | The angle in degrees to rotate each character within text strings. |
bool HPS::TextAttributeKit::ShowSize | ( | float & | out_size, |
Text::SizeUnits & | out_units | ||
) | const |
Shows the font size to use for text.
out_size | The size for text. |
out_units | The units of the size for text. |
bool HPS::TextAttributeKit::ShowSizeTolerance | ( | bool & | out_state, |
float & | out_size, | ||
Text::SizeToleranceUnits & | out_units | ||
) | const |
Shows the size tolerance settings to use for text.
out_state | Whether a size tolerance is enabled for text. |
out_size | The size for the tolerance. |
out_units | The units of the size for the tolerance. |
bool HPS::TextAttributeKit::ShowSlant | ( | float & | out_angle | ) | const |
Shows the slant angle for text.
out_angle | The angle in degrees to slant text. |
bool HPS::TextAttributeKit::ShowSpacing | ( | float & | out_multiplier | ) | const |
Shows the spacing multiplier for text.
out_multiplier | The spacing multiplier for text. |
bool HPS::TextAttributeKit::ShowStrikethrough | ( | bool & | out_state | ) | const |
Shows whether a strikethrough should be drawn through text.
out_state | Whether a strikethrough should be drawn through text. |
bool HPS::TextAttributeKit::ShowTransform | ( | Text::Transform & | out_trans | ) | const |
Shows the transform state for text.
out_transform | The transform state for text. |
bool HPS::TextAttributeKit::ShowUnderline | ( | bool & | out_state | ) | const |
Shows whether an underline should be drawn under text.
out_state | Whether an underline should be drawn under text. |
TextAttributeKit& HPS::TextAttributeKit::UnsetAlignment | ( | ) |
Removes the alignment setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetBold | ( | ) |
Removes the bold setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetEverything | ( | ) |
Removes all settings from this object.
TextAttributeKit& HPS::TextAttributeKit::UnsetExtraSpace | ( | ) |
Removes the extra space setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetFont | ( | ) |
Removes the font setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetGreeking | ( | ) |
Removes the greeking setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetItalic | ( | ) |
Removes the italic setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetLineSpacing | ( | ) |
Removes the line spacing setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetOverline | ( | ) |
Removes the overline setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetPath | ( | ) |
Removes the path setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetPreference | ( | ) |
Removes the preference setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetRenderer | ( | ) |
Removes the renderer setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetRotation | ( | ) |
Removes the rotation setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetSize | ( | ) |
Removes the size setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetSizeTolerance | ( | ) |
Removes the size tolerance setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetSlant | ( | ) |
Removes the slant setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetSpacing | ( | ) |
Removes the spacing setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetStrikethrough | ( | ) |
Removes the strikethrough setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetTransform | ( | ) |
Removes the transform setting.
TextAttributeKit& HPS::TextAttributeKit::UnsetUnderline | ( | ) |
Removes the underline setting.