CharacterAttributeKit

class CharacterAttributeKit : public HPS::Kit

The CharacterAttributeKit class is a user space object. It is used to specify attributes that can be applied to individial character of a text object.

Public Functions

CharacterAttributeKit()

The default constructor creates an empty CharacterAttributeKit object.

CharacterAttributeKit(CharacterAttributeKit &&in_that)

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

Parameters:in_that – An rvalue reference to a CharacterAttributeKit to take the impl from.
CharacterAttributeKit(CharacterAttributeKit const &in_kit)

The copy constructor creates a new CharacterAttributeKit object that contains the same settings as the source CharacterAttributeKit.

Parameters:in_kit – The source CharacterAttributeKit to copy.
virtual bool Empty() const

Indicates whether this CharacterAttributeKit has any values set on it.

Returns:true if no values are set on this CharacterAttributeKit, false otherwise.
bool Equals(CharacterAttributeKit const &in_kit) const

Check if the source CharacterAttributeKit is equivalent to this CharacterAttributeKit.

Parameters:in_kit – The source CharacterAttributeKit to compare to this CharacterAttributeKit.
Returns:true if the objects are equivalent, false otherwise.
inline virtual HPS::Type ObjectType() const

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Returns:The declared type of the object in question, which may differ from the true, underlying type.
bool operator!=(CharacterAttributeKit const &in_kit) const

Check if the source CharacterAttributeKit is not equivalent to this CharacterAttributeKit.

Parameters:in_kit – The source CharacterAttributeKit to compare to this CharacterAttributeKit.
Returns:true if the objects are not equivalent, false otherwise.
CharacterAttributeKit &operator=(CharacterAttributeKit &&in_that)

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

Parameters:in_that – An rvalue reference to a CharacterAttributeKit to take the impl from.
Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &operator=(CharacterAttributeKit const &in_kit)

Copies the source CharacterAttributeKit into this CharacterAttributeKit.

Parameters:in_kit – The source CharacterAttributeKit to copy.
Returns:A reference to this CharacterAttributeKit.
bool operator==(CharacterAttributeKit const &in_kit) const

Check if the source CharacterAttributeKit is equivalent to this CharacterAttributeKit.

Parameters:in_kit – The source CharacterAttributeKit to compare to this CharacterAttributeKit.
Returns:true if the objects are equivalent, false otherwise.
void Set(CharacterAttributeKit const &in_kit)

Copies the source CharacterAttributeKit into this CharacterAttributeKit.

Parameters:in_kit – The source CharacterAttributeKit to copy.
CharacterAttributeKit &SetColor(HPS::RGBColor const &in_color)

Sets the color for the character(s).

Parameters:in_color – The color for the character(s).
Returns:A reference to this CharacterAttributeKit.
inline CharacterAttributeKit &SetColor(int in_index)

Sets the color for the character(s).

Parameters:in_color – The color index for the character(s).
Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &SetFont(char const *in_font)

Sets the font for the character(s).

Parameters:in_font – The font for the character(s).
Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &SetHorizontalOffset(float offset, HPS::Text::SizeUnits units)

Sets the horizontal offset to use for the character(s).

Parameters:
  • in_size – The offset for the character(s).
  • in_units – The units of the offset for the character(s).
Returns:

A reference to this TextKit.

CharacterAttributeKit &SetInvisible()

Sets invisibility for the character(s).

Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &SetOmitted()

Sets omission for the character(s).

Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &SetRotation(float in_rotation, bool in_fixed = false)

Sets the rotation for the character(s).

Parameters:
  • in_rotation – The rotation for the character(s).
  • in_fixed – Whether the rotation is fixed to screen space rather than following the character path (default is false).
Returns:

A reference to this CharacterAttributeKit.

CharacterAttributeKit &SetSize(float size, HPS::Text::SizeUnits units)

Sets the font size to use for the character(s).

Parameters:
  • in_size – The size for the character(s).
  • in_units – The units of the size for the character(s).
Returns:

A reference to this TextKit.

CharacterAttributeKit &SetSlant(float in_slant)

Sets the slant for the character(s).

Parameters:in_scale – The slant for the character(s).
Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &SetVerticalOffset(float offset, HPS::Text::SizeUnits units)

Sets the font vertical offset to use for the character(s).

Parameters:
  • in_size – The offset for the character(s).
  • in_units – The units of the offset for the character(s).
Returns:

A reference to this TextKit.

CharacterAttributeKit &SetWidthScale(float in_scale)

Sets the width scaling for the character(s).

Parameters:in_scale – The width scaling for the character(s).
Returns:A reference to this CharacterAttributeKit.
void Show(CharacterAttributeKit &out_kit) const

Copies this CharacterAttributeKit into the given CharacterAttributeKit.

Parameters:out_kit – The CharacterAttributeKit to populate with the contents of this CharacterAttributeKit.
bool ShowColor(HPS::RGBColor &out_color) const

Shows the color.

Parameters:out_color – The color for the character(s).
Returns:true if a color was set, false otherwise.
bool ShowFont(UTF8 &out_font) const

Shows the font to use for the character(s).

Parameters:out_font – UTF8-encoded font name to use for the character(s).
Returns:true if a font was set, false otherwise.
bool ShowHorizontalOffset(float &out_offset, HPS::Text::SizeUnits &out_units) const

Shows the horizontal offset to use for the character(s).

Parameters:
  • out_offset – The offset for the character(s).
  • out_units – The units of the offset for the character(s).
Returns:

true if an offset was set, false otherwise.

bool ShowInvisible() const

Shows the invisibility state.

Returns:true if invisibility was set, false otherwise.
bool ShowOmitted() const

Shows the omission state.

Returns:true if invisibility was set, false otherwise.
bool ShowRotation(float &out_rotation, bool &out_fixed) const

Shows the rotation for the character(s).

Parameters:
  • out_rotation – The rotation for the character(s).
  • out_fixed – Whether the rotation is fixed to sceen space.
Returns:

true if a rotation was set, false otherwise.

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

Shows the font size to use for the character(s).

Parameters:
  • out_size – The size for the character(s).
  • out_units – The units of the size for the character(s).
Returns:

true if a size was set, false otherwise.

bool ShowSlant(float &out_slant) const

Shows the slant for the character(s).

Parameters:out_slant – The slant for the character(s).
Returns:true if a slant was set, false otherwise.
bool ShowVerticalOffset(float &out_offset, HPS::Text::SizeUnits &out_units) const

Shows the vertical offset to use for the character(s).

Parameters:
  • out_offset – The offset for the character(s).
  • out_units – The units of the offset for the character(s).
Returns:

true if an offset was set, false otherwise.

bool ShowWidthScale(float &out_scale) const

Shows the width scaling for the character(s).

Parameters:out_scale – The width scaling for the character(s).
Returns:true if a width scale was set, false otherwise.
CharacterAttributeKit &UnsetColor()

Removes the color for the character(s).

Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &UnsetEverything()

Removes all settings from this CharacterAttributeKit.

Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &UnsetFont()

Removes the font for the character(s).

Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &UnsetHorizontalOffset()

Removes the horizontal offset for the character(s).

Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &UnsetInvisible()

Removes the invisibility for the character(s).

Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &UnsetOmitted()

Removes the Omission for the character(s).

Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &UnsetRotation()

Removes the rotation for the character(s).

Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &UnsetSize()

Removes the size for the character(s).

Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &UnsetSlant()

Removes the slant for the character(s).

Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &UnsetVerticalOffset()

Removes the vertical offset for the character(s).

Returns:A reference to this CharacterAttributeKit.
CharacterAttributeKit &UnsetWidthScale()

Removes the width scaling for the character(s).

Returns:A reference to this CharacterAttributeKit.
virtual ~CharacterAttributeKit()

Public Static Attributes

static const HPS::Type staticType = HPS::Type::CharacterAttributeKit