The TextKit class is a user space object. More...
#include <hps.h>
Public Member Functions | |
TextKit () | |
The default constructor creates an empty TextKit object. More... | |
TextKit (TextKit const &in_kit) | |
The copy constructor creates a new TextKit object that contains the same settings as the source TextKit. More... | |
TextKit (TextKit &&in_that) | |
The move constructor creates a TextKit by transferring the underlying impl of the rvalue reference to this TextKit thereby avoiding a copy and allocation. More... | |
TextKit & | operator= (TextKit &&in_that) |
The move assignment operator transfers the underlying impl of the rvalue reference to this TextKit thereby avoiding a copy. More... | |
virtual | ~TextKit () |
HPS::Type | ObjectType () const |
void | Consume (TextKit &in_kit) |
Copies the source TextKit into this TextKit and resets the source kit. More... | |
void | Set (TextKit const &in_kit) |
Copies the source TextKit into this TextKit. More... | |
void | Show (TextKit &out_kit) const |
Copies this TextKit into the given TextKit. More... | |
TextKit & | operator= (TextKit const &in_kit) |
Copies the source TextKit into this TextKit. More... | |
bool | Empty () const |
Indicates whether this TextKit has any values set on it. More... | |
bool | Equals (TextKit const &in_kit) const |
Check if the source TextKit is equivalent to this TextKit. More... | |
bool | operator== (TextKit const &in_kit) const |
Check if the source TextKit is equivalent to this TextKit. More... | |
bool | operator!= (TextKit const &in_kit) const |
Check if the source TextKit is not equivalent to this TextKit. More... | |
TextKit & | SetPriority (int in_priority) |
Assigns a specific drawing priority value to the TextKit. More... | |
TextKit & | UnsetPriority () |
Removes a drawing priority setting. More... | |
bool | ShowPriority (int &out_priority) const |
Shows the drawing priority. More... | |
TextKit & | SetPosition (Point const &in_position) |
Sets the position of the text in object space. More... | |
TextKit & | SetText (char const *in_string) |
Sets the contents of the string for the text. More... | |
TextKit & | SetColor (RGBAColor const &in_rgba_color) |
Sets the RGBA color of the text. More... | |
TextKit & | SetColorByIndex (float in_index) |
Sets the material index color for the text. More... | |
TextKit & | SetModellingMatrix (MatrixKit const &in_matrix) |
Sets the modelling matrix for the text. More... | |
TextKit & | SetAlignment (Text::Alignment in_alignment, Text::ReferenceFrame in_reference_frame=Text::ReferenceFrame::WorldAligned, Text::Justification in_justification=Text::Justification::Left) |
Sets the alignment for the text. More... | |
TextKit & | SetBold (bool in_state) |
Sets whether the text should be bold. More... | |
TextKit & | SetItalic (bool in_state) |
Sets whether the text should be italic. More... | |
TextKit & | SetOverline (bool in_state) |
Sets whether an overline should be drawn over the text. More... | |
TextKit & | SetStrikethrough (bool in_state) |
Sets whether a strikethrough should be drawn through the text. More... | |
TextKit & | SetUnderline (bool in_state) |
Sets whether an underline should be drawn under the text. More... | |
TextKit & | SetSlant (float in_angle) |
Sets the slant angle for the text. More... | |
TextKit & | SetLineSpacing (float in_multiplier) |
Sets the line spacing multiplier for the text. More... | |
TextKit & | SetRotation (Text::Rotation in_state, float in_angle=0.0f) |
Sets the angle characters should be rotated within the text string. More... | |
TextKit & | SetRotation (float in_angle) |
Sets the angle characters should be rotated within the text string. More... | |
TextKit & | 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. More... | |
TextKit & | SetExtraSpace (float in_size, Text::SizeUnits in_units) |
Sets the amount of additional space to add between characters in a text string. More... | |
TextKit & | 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 the text. More... | |
TextKit & | SetGreeking (float in_size, Text::GreekingUnits in_units, Text::GreekingMode in_mode=Text::GreekingMode::Lines) |
Sets the greeking settings to use for the text. More... | |
TextKit & | SetSizeTolerance (bool in_state, float in_size=50.0f, Text::SizeToleranceUnits in_units=Text::SizeToleranceUnits::Percent) |
Sets the size tolerance settings to use for the text. More... | |
TextKit & | SetSizeTolerance (float in_size, Text::SizeToleranceUnits in_units) |
Sets the size tolerance settings to use for the text. More... | |
TextKit & | SetSize (float in_size, Text::SizeUnits in_units) |
Sets the font size to use for the text. More... | |
TextKit & | SetFont (char const *in_name) |
Sets the font to use for the text. More... | |
TextKit & | SetTransform (Text::Transform in_trans) |
Sets the transform behavior for the text. More... | |
TextKit & | SetRenderer (Text::Renderer in_rend) |
Sets the renderer for the text. More... | |
TextKit & | SetPreference (Text::Preference in_pref) |
Sets the font type preference for the text. More... | |
TextKit & | SetPreference (float in_cutoff, Text::SizeUnits in_units, Text::Preference in_smaller, Text::Preference in_larger) |
Sets the preference for the text. More... | |
TextKit & | SetPath (Vector const &in_path) |
Sets the path for the text. More... | |
TextKit & | SetSpacing (float in_multiplier) |
Sets the spacing multiplier for the text. More... | |
TextKit & | SetBackground (bool in_state, char const *in_name) |
Sets the background to be used with text. More... | |
TextKit & | SetBackground (char const *in_name) |
Sets the background to be used with text. More... | |
TextKit & | SetBackground (bool in_state) |
Sets the background to be used with text. More... | |
TextKit & | SetBackgroundMargins (float in_size, Text::MarginUnits in_units=Text::MarginUnits::Percent) |
Sets the amount of additional padding around text strings when backgrounds are used. More... | |
TextKit & | SetBackgroundMargins (FloatArray const &in_sizes, TextMarginUnitsArray const &in_units) |
Sets the amount of additional padding around text strings when backgrounds are used. More... | |
TextKit & | 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. More... | |
TextKit & | SetBackgroundStyle (char const *in_name) |
Allows specifying a named style to be used in the drawing of text backgrounds. More... | |
TextKit & | SetLeaderLine (Point const &in_position, Text::LeaderLineSpace in_space=Text::LeaderLineSpace::Object) |
Inserts a leader line for this text, with one end specified by in_position and the other end calculated automatically. More... | |
TextKit & | SetLeaderLines (PointArray const &in_positions, Text::LeaderLineSpace in_space=Text::LeaderLineSpace::Object) |
Inserts leader lines for this text. More... | |
TextKit & | SetLeaderLines (size_t in_count, Point const in_positions [], Text::LeaderLineSpace in_space=Text::LeaderLineSpace::Object) |
Inserts leader lines for this text. More... | |
TextKit & | UnsetPosition () |
Removes the text position. More... | |
TextKit & | UnsetText () |
Removes the text string. More... | |
TextKit & | UnsetColor () |
Removes the color (RGBA or material index) from the text. More... | |
TextKit & | UnsetModellingMatrix () |
Removes the modelling matrix from the text. More... | |
TextKit & | UnsetAlignment () |
Removes the alignment setting from the text. More... | |
TextKit & | UnsetBold () |
Removes the bold setting from the text. More... | |
TextKit & | UnsetItalic () |
Removes the italic setting from the text. More... | |
TextKit & | UnsetOverline () |
Removes the overline setting from the text. More... | |
TextKit & | UnsetStrikethrough () |
Removes the strikethrough setting from the text. More... | |
TextKit & | UnsetUnderline () |
Removes the underline setting from the text. More... | |
TextKit & | UnsetSlant () |
Removes the slant setting from the text. More... | |
TextKit & | UnsetLineSpacing () |
Removes the line spacing setting from the text. More... | |
TextKit & | UnsetRotation () |
Removes the rotation setting from the text. More... | |
TextKit & | UnsetExtraSpace () |
Removes the extra space setting from the text. More... | |
TextKit & | UnsetGreeking () |
Removes the greeking settings from the text. More... | |
TextKit & | UnsetSizeTolerance () |
Removes the size tolerance setting from the text. More... | |
TextKit & | UnsetSize () |
Removes the size setting from the text. More... | |
TextKit & | UnsetFont () |
Removes the font setting from the text. More... | |
TextKit & | UnsetTransform () |
Removes the transform setting from the text. More... | |
TextKit & | UnsetRenderer () |
Removes the renderer setting from the text. More... | |
TextKit & | UnsetPreference () |
Removes the font type preference from the text. More... | |
TextKit & | UnsetPath () |
Removes the path from the text. More... | |
TextKit & | UnsetSpacing () |
Removes the spacing setting from the text. More... | |
TextKit & | UnsetBackground () |
Removes the background setting. More... | |
TextKit & | UnsetBackgroundMargins () |
Removes the background margin setting. More... | |
TextKit & | UnsetBackgroundStyle () |
Removes the background style setting. More... | |
TextKit & | UnsetLeaderLines () |
Removes the leader line setting. More... | |
TextKit & | UnsetEverything () |
Removes all settings from this TextKit. More... | |
bool | ShowPosition (Point &out_position) const |
Shows the position for the text. More... | |
bool | ShowText (UTF8 &out_string) const |
Shows the string for the text. More... | |
bool | ShowColor (Material::Type &out_type, RGBAColor &out_rgba_color, float &out_index) const |
Shows the color for the text. More... | |
bool | ShowModellingMatrix (MatrixKit &out_matrix) const |
Shows the modelling matrix for the text. More... | |
bool | ShowAlignment (Text::Alignment &out_alignment, Text::ReferenceFrame &out_reference_frame, Text::Justification &out_justification) const |
Shows the aligment for the text. More... | |
bool | ShowBold (bool &out_state) const |
Shows whether the text should be bold. More... | |
bool | ShowItalic (bool &out_state) const |
Shows whether the text should be italic. More... | |
bool | ShowOverline (bool &out_state) const |
Shows whether an overline should be drawn over the text. More... | |
bool | ShowStrikethrough (bool &out_state) const |
Shows whether a strikethrough should be drawn through the text. More... | |
bool | ShowUnderline (bool &out_state) const |
Shows whether an underline should be drawn under the text. More... | |
bool | ShowSlant (float &out_angle) const |
Shows the slant angle for the text. More... | |
bool | ShowLineSpacing (float &out_multiplier) const |
Shows the line spacing multiplier for the text. More... | |
bool | ShowRotation (Text::Rotation &out_rot, float &out_angle) const |
Shows the angle characters should be rotated within the text string. 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 the text. More... | |
bool | ShowSizeTolerance (bool &out_state, float &out_size, Text::SizeToleranceUnits &out_units) const |
Shows the size tolerance settings to use for the text. More... | |
bool | ShowSize (float &out_size, Text::SizeUnits &out_units) const |
Shows the font size to use for the text. More... | |
bool | ShowFont (UTF8 &out_name) const |
Shows the font to use for the text. More... | |
bool | ShowTransform (Text::Transform &out_trans) const |
Shows the transform state for the text. More... | |
bool | ShowRenderer (Text::Renderer &out_renderer) const |
Shows the renderer for the text. More... | |
bool | ShowPreference (float &out_cutoff, Text::SizeUnits &out_units, Text::Preference &out_smaller, Text::Preference &out_larger) const |
Shows the preference for the text. More... | |
bool | ShowPath (Vector &out_path) const |
Shows the path for the text. More... | |
bool | ShowSpacing (float &out_multiplier) const |
Shows the spacing multiplier for the 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... | |
bool | ShowLeaderLines (PointArray &out_positions, Text::LeaderLineSpace &out_space) const |
Shows the leader lines to be used with text. More... | |
TextKit & | EditTextByInsertion (size_t in_row, size_t in_column, size_t in_count, char const *in_text) |
Adds characters to the text at the specified offset. More... | |
TextKit & | EditTextByDeletion (size_t in_row, size_t in_column, size_t in_count) |
Removes characters from the text at the specified offset. More... | |
TextKit & | EditTextByReplacement (size_t in_row, size_t in_column, size_t in_count, char const *in_text) |
Replaces characters from the text at the specified offset. More... | |
bool | ShowRegion (PointArray &out_region, Text::RegionAlignment &out_region_alignment, Text::RegionFitting &out_region_fitting, bool &out_region_adjust_direction, bool &out_region_relative_coordinates, bool &out_region_window_space) const |
Shows the region for the text. More... | |
TextKit & | SetRegion (PointArray const &in_region, Text::RegionAlignment in_region_alignment, Text::RegionFitting in_region_fitting, bool in_region_adjust_direction, bool in_region_relative_coordinates, bool in_region_window_space) |
Sets the region for the text. More... | |
TextKit & | SetRegion (size_t in_region_count, Point const in_region [], Text::RegionAlignment in_region_alignment, Text::RegionFitting in_region_fitting, bool in_region_adjust_direction, bool in_region_relative_coordinates, bool in_region_window_space) |
Sets the region for the text. More... | |
TextKit & | SetUserData (intptr_t in_index, size_t in_bytes, byte const in_data[]) |
Sets user data on this kit. More... | |
TextKit & | UnsetRegion () |
Removes the region setting from the text. More... | |
TextKit & | SetUserData (intptr_t in_index, ByteArray const &in_data) |
Sets user data on this kit. More... | |
TextKit & | SetUserData (IntPtrTArray const &in_indices, ByteArrayArray const &in_data) |
Sets user data on this kit. More... | |
TextKit & | UnsetUserData (intptr_t in_index) |
Removes the user data at the given index from this kit. More... | |
TextKit & | UnsetUserData (size_t in_count, intptr_t const in_indices[]) |
Removes the user data at the given indices from this kit. More... | |
TextKit & | UnsetUserData (IntPtrTArray const &in_indices) |
Removes the user data at the given indices from this kit. More... | |
TextKit & | UnsetAllUserData () |
Removes all user data from this kit. More... | |
size_t | ShowUserDataCount () const |
Get the number of user data indices set on this kit. More... | |
bool | ShowUserDataIndices (IntPtrTArray &out_indices) const |
Shows the indices of all user data set on this kit. More... | |
bool | ShowUserData (intptr_t in_index, ByteArray &out_data) const |
Shows the user data at a given index for this kit. More... | |
bool | ShowUserData (IntPtrTArray &out_indices, ByteArrayArray &out_data) const |
Shows all user data for this kit. More... | |
virtual HPS::Type | Type () const |
This function returns the true type of the underlying object. 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::TextKit |
HPS::TextKit::TextKit | ( | ) |
The default constructor creates an empty TextKit object.
HPS::TextKit::TextKit | ( | TextKit const & | in_kit | ) |
HPS::TextKit::TextKit | ( | TextKit && | in_that | ) |
|
virtual |
|
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.
void HPS::TextKit::Consume | ( | TextKit & | in_kit | ) |
TextKit& HPS::TextKit::EditTextByDeletion | ( | size_t | in_row, |
size_t | in_column, | ||
size_t | in_count | ||
) |
Removes characters from the text at the specified offset.
in_row | The row offset into a multiline text string. This value must be less than the number of lines in the text string. |
in_column | The column offset in Unicode code points into the specified row in a multiline text string. This value must be less than the number of Unicode code points within the specified row. |
in_count | The number of Unicode code points within the given text string to remove. |
TextKit& HPS::TextKit::EditTextByInsertion | ( | size_t | in_row, |
size_t | in_column, | ||
size_t | in_count, | ||
char const * | in_text | ||
) |
Adds characters to the text at the specified offset.
in_row | The row offset into a multiline text string. This value must be less than the number of lines in the text string. |
in_column | The column offset in Unicode code points into the specified row in a multiline text string. This value must be less than the number of Unicode code points within the specified row. |
in_count | The number of Unicode code points within the given text string to insert into the text. |
in_text | UTF8-encoded text to insert into the text. This must contain at least in_count Unicode code points. |
TextKit& HPS::TextKit::EditTextByReplacement | ( | size_t | in_row, |
size_t | in_column, | ||
size_t | in_count, | ||
char const * | in_text | ||
) |
Replaces characters from the text at the specified offset.
in_row | The row offset into a multiline text string. This value must be less than the number of lines in the text string. |
in_column | The column offset in Unicode code points into the specified row in a multiline text string. This value must be less than the number of Unicode code points within the specified row. |
in_count | The number of Unicode code points within the given text string to remove. |
in_text | UTF8-encoded text to perform replacement with. This must contain at least in_count Unicode code points. |
|
virtual |
Indicates whether this TextKit has any values set on it.
Reimplemented from HPS::Object.
bool HPS::TextKit::Equals | ( | TextKit const & | in_kit | ) | const |
|
inherited |
Returns a unique identifier that is shared by all objects of the same class.
|
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.
|
inherited |
|
inlinevirtual |
bool HPS::TextKit::operator!= | ( | TextKit const & | in_kit | ) | const |
bool HPS::TextKit::operator== | ( | TextKit const & | in_kit | ) | const |
|
virtualinherited |
Resets this object to its initial, uninitialized state.
Reimplemented in HPS::EventHandler, HPS::EventDispatcher, HPS::World, HPS::HighlightSearchResults, HPS::HighlightSearchResultsIterator, HPS::SelectionResults, HPS::SelectionResultsIterator, HPS::FontSearchResults, HPS::FontSearchResultsIterator, HPS::SearchResults, and HPS::SearchResultsIterator.
void HPS::TextKit::Set | ( | TextKit const & | in_kit | ) |
TextKit& HPS::TextKit::SetAlignment | ( | Text::Alignment | in_alignment, |
Text::ReferenceFrame | in_reference_frame = Text::ReferenceFrame::WorldAligned , |
||
Text::Justification | in_justification = Text::Justification::Left |
||
) |
Sets the alignment for the text.
in_alignment | The alignment for the text. |
in_reference_frame | The reference frame for the text. Defaults to Text::ReferenceFrame::WorldAligned. |
in_justification | The justification for the text. Defaults to Text::Justification::Left. |
TextKit& HPS::TextKit::SetBackground | ( | bool | in_state, |
char const * | in_name | ||
) |
Sets the background to be used with text.
in_state | Whether a background is drawn for text. |
in_name | The name of a shape definition. |
TextKit& HPS::TextKit::SetBackground | ( | char const * | in_name | ) |
Sets the background to be used with text.
The state is implicitly on.
in_name | The name of a shape definition. |
TextKit& HPS::TextKit::SetBackground | ( | bool | in_state | ) |
Sets the background to be used with text.
in_state | Whether a background is drawn for text. |
TextKit& HPS::TextKit::SetBackgroundMargins | ( | float | in_size, |
Text::MarginUnits | in_units = Text::MarginUnits::Percent |
||
) |
Sets the amount of additional padding around text strings when backgrounds are used.
in_size | The size of the margins. |
in_units | The units of the size. |
TextKit& HPS::TextKit::SetBackgroundMargins | ( | FloatArray const & | in_sizes, |
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.
in_sizes | The size of the margins. |
in_units | The units of the size. |
TextKit& HPS::TextKit::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.
in_count | The number of elements in each array. |
in_sizes | The size of the margins. |
in_units | The units of the size. |
TextKit& HPS::TextKit::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.
in_name | The name of a style, defined in a portfolio that is accessible. |
TextKit& HPS::TextKit::SetBold | ( | bool | in_state | ) |
Sets whether the text should be bold.
For fonts which do not have a bold variant, this setting will be ignored.
in_state | Whether the text should be bold. |
Sets the RGBA color of the text.
in_rgba_color | The RGBA color of the text. |
TextKit& HPS::TextKit::SetColorByIndex | ( | float | in_index | ) |
Sets the material index color for the text.
in_index | The material index color for the text. |
TextKit& HPS::TextKit::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 addtional space between characters in a text string. |
in_size | The size of the addtional space to add between characters. Defaults to 0.0f. |
in_units | The units of the size of the additional space to add between characters. Defaults to Text::SizeUnits::ObjectSpace. |
TextKit& HPS::TextKit::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 addtional space to add between characters. |
in_units | The units of the size of the additional space to add between characters. |
TextKit& HPS::TextKit::SetFont | ( | char const * | in_name | ) |
Sets the font to use for the 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 the text. |
TextKit& HPS::TextKit::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 the text.
in_state | Whether greeking is enabled for this text. |
in_size | The size below which to draw a simple symbol in place of a character. Defaults to 0.0f. |
in_units | The units of the size below which to draw a simple glyph in place of a character. Defaults to Text::GreekingUnits::ObjectSpace. |
in_mode | The type of symbol to draw for characters which are smaller than the greeking size. Defaults to Text::GreekingMode::Lines. |
TextKit& HPS::TextKit::SetGreeking | ( | float | in_size, |
Text::GreekingUnits | in_units, | ||
Text::GreekingMode | in_mode = Text::GreekingMode::Lines |
||
) |
Sets the greeking settings to use for the 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. Defaults to Text::Gree::Lines. |
TextKit& HPS::TextKit::SetItalic | ( | bool | in_state | ) |
Sets whether the text should be italic.
For fonts which do not have an italic variant, this setting will be ignored.
in_state | Whether the text should be italic. |
TextKit& HPS::TextKit::SetLeaderLine | ( | Point const & | in_position, |
Text::LeaderLineSpace | in_space = Text::LeaderLineSpace::Object |
||
) |
Inserts a leader line for this text, with one end specified by in_position and the other end calculated automatically.
in_position | the target position of the leader line. |
in_space | the coordinate space in which in_position is specified. |
TextKit& HPS::TextKit::SetLeaderLines | ( | PointArray const & | in_positions, |
Text::LeaderLineSpace | in_space = Text::LeaderLineSpace::Object |
||
) |
Inserts leader lines for this text.
in_positions | the target positions of the leader lines. |
in_space | the coordinate space in which in_positions is specified. |
TextKit& HPS::TextKit::SetLeaderLines | ( | size_t | in_count, |
Point const | in_positions[], | ||
Text::LeaderLineSpace | in_space = Text::LeaderLineSpace::Object |
||
) |
Inserts leader lines for this text.
in_count | the size of in_positions. |
in_positions | the target positions of the leader lines. |
in_space | the coordinate space in which in_positions is specified. |
TextKit& HPS::TextKit::SetLineSpacing | ( | float | in_multiplier | ) |
Sets the line spacing multiplier for the 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 the text. |
Sets the modelling matrix for the text.
in_matrix | The modelling matrix for the text. |
TextKit& HPS::TextKit::SetOverline | ( | bool | in_state | ) |
Sets whether an overline should be drawn over the text.
in_state | Whether an overline should be drawn over the text. |
Sets the path for the text.
This setting controls the vector along which a text string will be displayed.
in_path | The path for the text. |
Sets the position of the text in object space.
The object-space position for the text.
TextKit& HPS::TextKit::SetPreference | ( | Text::Preference | in_pref | ) |
Sets the font type preference for the text.
This function implicitly sets the same font type for all text sizes.
in_preference | The font type preference for the text. |
TextKit& HPS::TextKit::SetPreference | ( | float | in_cutoff, |
Text::SizeUnits | in_units, | ||
Text::Preference | in_smaller, | ||
Text::Preference | in_larger | ||
) |
Sets the preference for the text.
This setting controls which font type is used for the 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. |
TextKit& HPS::TextKit::SetPriority | ( | int | in_priority | ) |
Assigns a specific drawing priority value to the TextKit.
It affects the order in which the contents of this segment are drawn if and only if the rendering algorithm is set to Priority.
in_priority | The drawing priority, higher priority items are drawn on top of lower priority items. |
TextKit& HPS::TextKit::SetRegion | ( | PointArray const & | in_region, |
Text::RegionAlignment | in_region_alignment, | ||
Text::RegionFitting | in_region_fitting, | ||
bool | in_region_adjust_direction, | ||
bool | in_region_relative_coordinates, | ||
bool | in_region_window_space | ||
) |
Sets the region for the text.
This setting forces the text to be rendererd along the vector defined by two object space points. A region additionally allows control over if text should be evenly spaced between those points, or allowed to grow or shrink to avoid stretching or overlapping characters. No region is set on the text by default.
in_region | The points defining the region for the text. This array must be of size 2 or 3. A two point region defines an implicit up vector which is rotated 90 degrees counter-clockwise from the region line. A three point region uses the first two points as the region line and the third point defines the plane in which a vector perpendicular to the region line will be computed for use as the up vector. |
in_region_alignment | How the text will be positioned relative to the region line. |
in_region_fitting | How the text is organized within the region. |
in_region_adjust_direction | Whether to draw text such that it is readable regardless of camera location. |
in_region_relative_coordinates | Whether the points defining the region are relative to the insertion point for the text. |
in_region_window_space | Whether the points defining the region are in window space coordinates. |
TextKit& HPS::TextKit::SetRegion | ( | size_t | in_region_count, |
Point const | in_region[], | ||
Text::RegionAlignment | in_region_alignment, | ||
Text::RegionFitting | in_region_fitting, | ||
bool | in_region_adjust_direction, | ||
bool | in_region_relative_coordinates, | ||
bool | in_region_window_space | ||
) |
Sets the region for the text.
This setting forces the text to be rendererd along the vector defined by two object space points. A region additionally allows control over if text should be evenly spaced between those points, or allowed to grow or shrink to avoid stretching or overlapping characters. No region is set on the text by default.
in_region_count | Size of the following array. This value must be 2 or 3. A two point region defines an implicit up vector which is rotated 90 degrees counter-clockwise from the region line. A three point region uses the first two points as the region line and the third point defines the plane in which a vector perpendicular to the region line will be computed for use as the up vector. |
in_region | The points defining the region for the text. |
in_region_alignment | How the text will be positioned relative to the region line. |
in_region_fitting | How the text is organized within the region. |
in_region_adjust_direction | Whether to draw text such that it is readable regardless of camera location. |
in_region_relative_coordinates | Whether the points defining the region are relative to the insertion point for the text. |
in_region_window_space | Whether the points defining the region are in window space coordinates. |
TextKit& HPS::TextKit::SetRenderer | ( | Text::Renderer | in_rend | ) |
Sets the renderer for the text.
in_renderer | The renderer for the text. |
TextKit& HPS::TextKit::SetRotation | ( | Text::Rotation | in_state, |
float | in_angle = 0.0f |
||
) |
Sets the angle characters should be rotated within the text string.
in_state | Whether and how to rotate the characters within the text string. |
in_angle | The angle in degrees to rotate each character within the text string. This is only relevant if in_state is Text::Rotation::Rotate. Defaults to 0.0f. |
TextKit& HPS::TextKit::SetRotation | ( | float | in_angle | ) |
Sets the angle characters should be rotated within the text string.
This function implicitly sets a rotation state of Text::Rotation::Rotate.
in_angle | The angle in degrees to rotate each character within the text string. |
TextKit& HPS::TextKit::SetSize | ( | float | in_size, |
Text::SizeUnits | in_units | ||
) |
Sets the font size to use for the text.
in_size | The size for the text. |
in_units | The units of the size for the text. |
TextKit& HPS::TextKit::SetSizeTolerance | ( | bool | in_state, |
float | in_size = 50.0f , |
||
Text::SizeToleranceUnits | in_units = Text::SizeToleranceUnits::Percent |
||
) |
Sets the size tolerance settings to use for the 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 this text. |
in_size | The size for the tolerance. Defaults to 50.0f. |
in_units | The units of the size for the tolerance. Defaults to Text::SizeToleranceUnits::Percent. |
TextKit& HPS::TextKit::SetSizeTolerance | ( | float | in_size, |
Text::SizeToleranceUnits | in_units | ||
) |
Sets the size tolerance settings to use for the 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. |
TextKit& HPS::TextKit::SetSlant | ( | float | in_angle | ) |
Sets the slant angle for the 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 the text. This value must be in the range [-75.0f,+75.0f]. |
TextKit& HPS::TextKit::SetSpacing | ( | float | in_multiplier | ) |
Sets the spacing multiplier for the 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 the text. |
TextKit& HPS::TextKit::SetStrikethrough | ( | bool | in_state | ) |
Sets whether a strikethrough should be drawn through the text.
in_state | Whether a strikethrough should be drawn through the text. |
TextKit& HPS::TextKit::SetText | ( | char const * | in_string | ) |
Sets the contents of the string for the text.
in_string | UTF8-encoded string for the text. |
TextKit& HPS::TextKit::SetTransform | ( | Text::Transform | in_trans | ) |
Sets the transform behavior for the text.
in_transform | The transform behavior for the text. |
TextKit& HPS::TextKit::SetUnderline | ( | bool | in_state | ) |
Sets whether an underline should be drawn under the text.
in_state | Whether an underline should be drawn under the text. |
Sets user data on this kit.
in_index | The index of the user data to set. |
in_bytes | The number of bytes of user data to set. |
in_data | The bytes of user data to set. |
Sets user data on this kit.
in_index | The index of the user data to set. |
in_data | The bytes of user data to set. |
TextKit& HPS::TextKit::SetUserData | ( | IntPtrTArray const & | in_indices, |
ByteArrayArray const & | in_data | ||
) |
Sets user data on this kit.
in_indices | An array of user data indices to set. |
in_data | An array of bytes of user data to set. |
void HPS::TextKit::Show | ( | TextKit & | out_kit | ) | const |
bool HPS::TextKit::ShowAlignment | ( | Text::Alignment & | out_alignment, |
Text::ReferenceFrame & | out_reference_frame, | ||
Text::Justification & | out_justification | ||
) | const |
Shows the aligment for the text.
out_alignment | The alignment for the text. |
out_reference_frame | The reference frame for the text. |
out_justification | The justification for the text. |
bool HPS::TextKit::ShowBackground | ( | bool & | out_state, |
UTF8 & | out_name | ||
) | const |
Shows the background to be used with text.
out_state | Whether a background is drawn for text. |
out_name | The name of a shape definition. |
bool HPS::TextKit::ShowBackgroundMargins | ( | FloatArray & | out_size, |
TextMarginUnitsArray & | out_units | ||
) | const |
Shows the amount of additional padding around text strings when backgrounds are used.
out_size | The size of the margins. |
out_units | The units of the sizes. |
bool HPS::TextKit::ShowBackgroundStyle | ( | UTF8 & | out_name | ) | const |
Shows the named style to be used in the drawing of text backgrounds.
out_name | The name of a style, defined in a portfolio that is accessible. |
bool HPS::TextKit::ShowBold | ( | bool & | out_state | ) | const |
Shows whether the text should be bold.
out_state | Whether the text should be bold. |
bool HPS::TextKit::ShowColor | ( | Material::Type & | out_type, |
RGBAColor & | out_rgba_color, | ||
float & | out_index | ||
) | const |
Shows the color for the text.
out_type | The type of color for the text. |
out_rgba_color | The RGBA color for the text. This is only valid if out_type is Material::Type::RGBAColor. |
out_index | The material index for the text. This is only valid if out_type is Material::Type::MaterialIndex. |
bool HPS::TextKit::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 addtional space between characters in a text string. |
out_size | The size of the addtional space to add between characters. |
out_units | The units of the size of the additional space to add between characters. |
bool HPS::TextKit::ShowFont | ( | UTF8 & | out_name | ) | const |
Shows the font to use for the text.
out_name | UTF8-encoded font name to use for the text. |
bool HPS::TextKit::ShowGreeking | ( | bool & | out_state, |
float & | out_size, | ||
Text::GreekingUnits & | out_units, | ||
Text::GreekingMode & | out_mode | ||
) | const |
Shows the greeking settings to use for the text.
out_state | Whether greeking is enabled for this 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::TextKit::ShowItalic | ( | bool & | out_state | ) | const |
Shows whether the text should be italic.
out_state | Whether the text should be italic. |
bool HPS::TextKit::ShowLeaderLines | ( | PointArray & | out_positions, |
Text::LeaderLineSpace & | out_space | ||
) | const |
Shows the leader lines to be used with text.
out_positions | the target positions of the leader lines. |
out_space | the coordinate space in which the points in out_positions are specified |
bool HPS::TextKit::ShowLineSpacing | ( | float & | out_multiplier | ) | const |
Shows the line spacing multiplier for the text.
out_multiplier | The line spacing multiplier for the text. |
bool HPS::TextKit::ShowModellingMatrix | ( | MatrixKit & | out_matrix | ) | const |
Shows the modelling matrix for the text.
out_matrix | The modelling matrix for the text. |
bool HPS::TextKit::ShowOverline | ( | bool & | out_state | ) | const |
Shows whether an overline should be drawn over the text.
out_state | Whether an overline should be drawn over the text. |
bool HPS::TextKit::ShowPath | ( | Vector & | out_path | ) | const |
Shows the path for the text.
out_path | The path for the text. |
bool HPS::TextKit::ShowPosition | ( | Point & | out_position | ) | const |
Shows the position for the text.
out_position | The object-space position for the text. |
bool HPS::TextKit::ShowPreference | ( | float & | out_cutoff, |
Text::SizeUnits & | out_units, | ||
Text::Preference & | out_smaller, | ||
Text::Preference & | out_larger | ||
) | const |
Shows the preference for the 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::TextKit::ShowPriority | ( | int & | out_priority | ) | const |
Shows the drawing priority.
out_priority | The drawing priority, higher priority items are drawn on top of lower priority items. |
bool HPS::TextKit::ShowRegion | ( | PointArray & | out_region, |
Text::RegionAlignment & | out_region_alignment, | ||
Text::RegionFitting & | out_region_fitting, | ||
bool & | out_region_adjust_direction, | ||
bool & | out_region_relative_coordinates, | ||
bool & | out_region_window_space | ||
) | const |
Shows the region for the text.
out_region | The points defining the region for the text. |
out_region_alignment | How the text will be positioned relative to the region line. |
out_region_fitting | How the text will be organized within the region. |
out_region_adjust_direction | Whether to draw text such that it is readable regardless of camera location. |
out_region_relative_coordinates | Whether the points defining the region are relative to the insertion point for the text. |
out_region_window_space | Whether the points defining the region are in window space coordinates. |
bool HPS::TextKit::ShowRenderer | ( | Text::Renderer & | out_renderer | ) | const |
Shows the renderer for the text.
in_renderer | The renderer for the text. |
bool HPS::TextKit::ShowRotation | ( | Text::Rotation & | out_rot, |
float & | out_angle | ||
) | const |
Shows the angle characters should be rotated within the text string.
out_rot | Whether to rotate the characters within the text string, and if so, what the angle should be measured with repect to. |
out_angle | The angle in degrees to rotate each character within the text string. |
bool HPS::TextKit::ShowSize | ( | float & | out_size, |
Text::SizeUnits & | out_units | ||
) | const |
Shows the font size to use for the text.
out_size | The size for the text. |
out_units | The units of the size for the text. |
bool HPS::TextKit::ShowSizeTolerance | ( | bool & | out_state, |
float & | out_size, | ||
Text::SizeToleranceUnits & | out_units | ||
) | const |
Shows the size tolerance settings to use for the text.
out_state | Whether a size tolerance is enabled for this text. |
out_size | The size for the tolerance. |
out_units | The units of the size for the tolerance. |
bool HPS::TextKit::ShowSlant | ( | float & | out_angle | ) | const |
Shows the slant angle for the text.
out_angle | The angle in degrees to slant the text. |
bool HPS::TextKit::ShowSpacing | ( | float & | out_multiplier | ) | const |
Shows the spacing multiplier for the text.
out_multiplier | The spacing multiplier for the text. |
bool HPS::TextKit::ShowStrikethrough | ( | bool & | out_state | ) | const |
Shows whether a strikethrough should be drawn through the text.
out_state | Whether a strikethrough should be drawn through the text. |
bool HPS::TextKit::ShowText | ( | UTF8 & | out_string | ) | const |
Shows the string for the text.
out_string | UTF8-encoded string for the text. |
bool HPS::TextKit::ShowTransform | ( | Text::Transform & | out_trans | ) | const |
Shows the transform state for the text.
out_transform | The transform state for the text. |
bool HPS::TextKit::ShowUnderline | ( | bool & | out_state | ) | const |
Shows whether an underline should be drawn under the text.
out_state | Whether an underline should be drawn under the text. |
bool HPS::TextKit::ShowUserData | ( | intptr_t | in_index, |
ByteArray & | out_data | ||
) | const |
Shows the user data at a given index for this kit.
in_index | The index of the user data to show. |
out_data | The user data at the given index. |
bool HPS::TextKit::ShowUserData | ( | IntPtrTArray & | out_indices, |
ByteArrayArray & | out_data | ||
) | const |
Shows all user data for this kit.
out_indices | An array of all user data indices set on this kit. |
out_data | An array of all user data set on this kit. |
size_t HPS::TextKit::ShowUserDataCount | ( | ) | const |
Get the number of user data indices set on this kit.
bool HPS::TextKit::ShowUserDataIndices | ( | IntPtrTArray & | out_indices | ) | const |
Shows the indices of all user data set on this kit.
out_indices | The user data indices set on this kit. |
|
inlinevirtualinherited |
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.
Reimplemented from HPS::Object.
TextKit& HPS::TextKit::UnsetAlignment | ( | ) |
Removes the alignment setting from the text.
TextKit& HPS::TextKit::UnsetAllUserData | ( | ) |
Removes all user data from this kit.
TextKit& HPS::TextKit::UnsetBackground | ( | ) |
Removes the background setting.
TextKit& HPS::TextKit::UnsetBackgroundMargins | ( | ) |
Removes the background margin setting.
TextKit& HPS::TextKit::UnsetBackgroundStyle | ( | ) |
Removes the background style setting.
TextKit& HPS::TextKit::UnsetBold | ( | ) |
Removes the bold setting from the text.
TextKit& HPS::TextKit::UnsetColor | ( | ) |
Removes the color (RGBA or material index) from the text.
TextKit& HPS::TextKit::UnsetEverything | ( | ) |
TextKit& HPS::TextKit::UnsetExtraSpace | ( | ) |
Removes the extra space setting from the text.
TextKit& HPS::TextKit::UnsetFont | ( | ) |
Removes the font setting from the text.
TextKit& HPS::TextKit::UnsetGreeking | ( | ) |
Removes the greeking settings from the text.
TextKit& HPS::TextKit::UnsetItalic | ( | ) |
Removes the italic setting from the text.
TextKit& HPS::TextKit::UnsetLeaderLines | ( | ) |
Removes the leader line setting.
TextKit& HPS::TextKit::UnsetLineSpacing | ( | ) |
Removes the line spacing setting from the text.
TextKit& HPS::TextKit::UnsetModellingMatrix | ( | ) |
Removes the modelling matrix from the text.
TextKit& HPS::TextKit::UnsetOverline | ( | ) |
Removes the overline setting from the text.
TextKit& HPS::TextKit::UnsetPath | ( | ) |
Removes the path from the text.
TextKit& HPS::TextKit::UnsetPosition | ( | ) |
Removes the text position.
TextKit& HPS::TextKit::UnsetPreference | ( | ) |
Removes the font type preference from the text.
TextKit& HPS::TextKit::UnsetPriority | ( | ) |
Removes a drawing priority setting.
TextKit& HPS::TextKit::UnsetRegion | ( | ) |
Removes the region setting from the text.
TextKit& HPS::TextKit::UnsetRenderer | ( | ) |
Removes the renderer setting from the text.
TextKit& HPS::TextKit::UnsetRotation | ( | ) |
Removes the rotation setting from the text.
TextKit& HPS::TextKit::UnsetSize | ( | ) |
Removes the size setting from the text.
TextKit& HPS::TextKit::UnsetSizeTolerance | ( | ) |
Removes the size tolerance setting from the text.
TextKit& HPS::TextKit::UnsetSlant | ( | ) |
Removes the slant setting from the text.
TextKit& HPS::TextKit::UnsetSpacing | ( | ) |
Removes the spacing setting from the text.
TextKit& HPS::TextKit::UnsetStrikethrough | ( | ) |
Removes the strikethrough setting from the text.
TextKit& HPS::TextKit::UnsetTransform | ( | ) |
Removes the transform setting from the text.
TextKit& HPS::TextKit::UnsetUnderline | ( | ) |
Removes the underline setting from the text.
TextKit& HPS::TextKit::UnsetUserData | ( | intptr_t | in_index | ) |
Removes the user data at the given index from this kit.
in_index | The index of the user data to remove. |
TextKit& HPS::TextKit::UnsetUserData | ( | size_t | in_count, |
intptr_t const | in_indices[] | ||
) |
Removes the user data at the given indices from this kit.
in_count | The size of the following array. |
in_indices | The indices of the user data to remove. |
TextKit& HPS::TextKit::UnsetUserData | ( | IntPtrTArray const & | in_indices | ) |
Removes the user data at the given indices from this kit.
in_indices | The indices of the user data to remove. |
|
static |