LineAttributeKit

class HPS::LineAttributeKit : public HPS::Kit

The HPS::LineAttributeKit class is a user space object, useful for carrying a group of attribute settings related to lines. Calling HPS::LineAttributeKit::GetDefault() will return a kit with values found in this table.

Public Functions

virtual bool Empty() const

Indicates whether this object has any values set on it.

Returns

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

bool Equals(LineAttributeKit const &in_kit) const

Check if the source LineAttributeKit is equivalent to this object.

Parameters

in_kit – The source LineAttributeKit to compare to this object.

Returns

true if the objects are equivalent, false otherwise.

LineAttributeKit()

Initializes an empty kit.

LineAttributeKit(LineAttributeKit &&in_that)

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

Parameters

in_that – An rvalue reference to a LineAttributeKit to take the impl from.

LineAttributeKit(LineAttributeKit const &in_kit)

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

Parameters

in_kit – The source object to copy.

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!=(LineAttributeKit const &in_kit) const

Check if the source LineAttributeKit is not equivalent to this object.

Parameters

in_kit – The source LineAttributeKit to compare to this object.

Returns

true if the objects are not equivalent, false otherwise.

LineAttributeKit &operator=(LineAttributeKit &&in_that)

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

Parameters

in_that – An rvalue reference to an LineAttributeKit to take the impl from.

Returns

A reference to this LineAttributeKit.

LineAttributeKit &operator=(LineAttributeKit const &in_kit)

Copies the source LineAttributeKit into this object.

Parameters

in_kit – The source LineAttributeKit to copy.

Returns

A reference to this object.

bool operator==(LineAttributeKit const &in_kit) const

Check if the source LineAttributeKit is equivalent to this object.

Parameters

in_kit – The source LineAttributeKit to compare to this object.

Returns

true if the objects are equivalent, false otherwise.

void Set(LineAttributeKit const &in_kit)

Copies all settings from the source LineAttributeKit into this object.

Parameters

in_kit – The source LineAttributeKit to copy.

LineAttributeKit &SetPattern(char const *in_name)

Specifies the pattern of lines.

See

Programming Guide: Line Patterns

Parameters

in_name – The name of a line pattern, defined in a portfolio that is accessible.

Returns

A reference to this object.

LineAttributeKit &SetPattern(char const *in_name, LinePatternOptionsKit const &in_options)

Specifies the pattern of lines.

See

Programming Guide: Line Patterns

Parameters
  • in_name – The name of a line pattern, defined in a portfolio that is accessible.

  • in_options – A set of options that modify how the named line pattern is applied.

Returns

A reference to this object.

LineAttributeKit &SetWeight(float in_weight, Line::SizeUnits in_units = Line::SizeUnits::ScaleFactor)

Sets the weight of lines.

Parameters
  • in_weight – The weight value for lines.

  • in_units – The units applied to in_weight.

Returns

A reference to this object.

void Show(LineAttributeKit &out_kit) const

Copies all settings from this LineAttributeKit into the given LineAttributeKit.

Parameters

out_kit – The LineAttributeKit to populate with the contents of this object.

bool ShowPattern(UTF8 &out_pattern, LinePatternOptionsKit &out_options) const

Shows the pattern used to draw lines.

Parameters
  • out_pattern – The name of a line pattern, defined in a portfolio that is accessible.

  • out_options – A set of options that modify how the named line pattern is applied.

Returns

true if the setting is valid, false otherwise.

bool ShowWeight(float &out_weight, Line::SizeUnits &out_units) const

Shows the weight of lines.

Parameters
  • out_weight – The weight value for lines.

  • out_units – The units applied to in_weight.

Returns

true if the setting is valid, false otherwise.

LineAttributeKit &UnsetEverything()

Removes all settings from this object.

Returns

A reference to this object.

LineAttributeKit &UnsetPattern()

Removes the line pattern setting for lines.

Returns

A reference to this object.

LineAttributeKit &UnsetWeight()

Removes the weight setting for lines.

Returns

A reference to this object.

virtual ~LineAttributeKit()

Destroy this kit.

Public Static Functions

static LineAttributeKit GetDefault()

Creates a LineAttributeKit 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.

Returns

A LineAttributeKit with the default settings.

Public Static Attributes

static const HPS::Type staticType = HPS::Type::LineAttributeKit