HPS::Image::ExportOptionsKit

class HPS::Image::ExportOptionsKit : public HPS::Kit

The HPS::Image::ExportOptionsKit class contains options that will be used to export image files. Calling HPS::Image::ExportOptionsKit::GetDefault() will return an options kit with values found in this table.

Public Functions

virtual bool Empty() const

Indicates whether this ExportOptionsKit has any values set on it.

Returns

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

bool Equals(ExportOptionsKit const &in_kit) const

Check if the source ExportOptionsKit is equivalent to this ExportOptionsKit.

Parameters

in_kit – The source ExportOptionsKit to compare to this ExportOptionsKit.

Returns

true if the objects are equivalent, false otherwise.

ExportOptionsKit()

The default constructor creates an empty ExportOptionsKit object.

ExportOptionsKit(ExportOptionsKit &&in_that)

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

Parameters

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

ExportOptionsKit(ExportOptionsKit const &in_kit)

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

Parameters

in_kit – The source ExportOptionsKit 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!=(ExportOptionsKit const &in_kit) const

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

Parameters

in_kit – The source ExportOptionsKit to compare to this ExportOptionsKit.

Returns

true if the objects are not equivalent, false otherwise.

ExportOptionsKit &operator=(ExportOptionsKit &&in_that)

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

Parameters

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

Returns

A reference to this ExportOptionsKit.

ExportOptionsKit &operator=(ExportOptionsKit const &in_kit)

Copies the source ExportOptionsKit into this ExportOptionsKit.

Parameters

in_kit – The source ExportOptionsKit to copy.

Returns

A reference to this ExportOptionsKit.

bool operator==(ExportOptionsKit const &in_kit) const

Check if the source ExportOptionsKit is equivalent to this ExportOptionsKit.

Parameters

in_kit – The source ExportOptionsKit to compare to this ExportOptionsKit.

Returns

true if the objects are equivalent, false otherwise.

void Set(ExportOptionsKit const &in_kit)

Copies the source ExportOptionsKit into this ExportOptionsKit.

Parameters

in_kit – The source ExportOptionsKit to copy.

ExportOptionsKit &SetFormat(Image::Format in_format)

Sets the format of the image. This must be specified when exporting any image.

See

Export format default value

Parameters

in_format – The format of the image.

Returns

A reference to this ExportOptionsKit.

ExportOptionsKit &SetSize(unsigned int in_width, unsigned int in_height)

Sets the width and height (in pixels) of the image. If this is not specified , an exception will be thrown on export.

Parameters
  • in_width – The width (in pixels) of the image.

  • in_height – The height (in pixels) of the image.

Returns

A reference to this ExportOptionsKit.

ExportOptionsKit &SetTransparentBackground(bool in_state)

Sets whether the image background will be transparent. This setting is only valid when exporting a PNG image.

Parameters

in_state – Whether the image background will be transparent.

Returns

A reference to this ExportOptionsKit.

void Show(ExportOptionsKit &out_kit) const

Copies this ExportOptionsKit into the given ExportOptionsKit.

Parameters

out_kit – The ExportOptionsKit to populate with the contents of this ExportOptionsKit.

bool ShowFormat(Image::Format &out_format) const

Shows the format of the image.

Parameters

out_format – The format of the image.

Returns

true if the format is valid, false otherwise.

bool ShowSize(unsigned int &out_width, unsigned int &out_height) const

Shows the width and height (in pixels) of the image.

Parameters
  • out_width – The width (in pixels) of the image.

  • out_height – The height (in pixels) of the image.

Returns

true if the width and height are valid, false otherwise.

bool ShowTransparentBackground(bool &out_state) const

Shows transparent background setting for this image

Parameters

out_state – The transparent background setting for this image.

Returns

true if a background preference was specified, false otherwise.

ExportOptionsKit &UnsetEverything()

Removes all settings from this ExportOptionsKit.

Returns

A reference to this ExportOptionsKit.

ExportOptionsKit &UnsetFormat()

Removes the format of the image.

Returns

A reference to this ExportOptionsKit.

ExportOptionsKit &UnsetSize()

Removes the width and height of the image.

Returns

A reference to this ExportOptionsKit.

ExportOptionsKit &UnsetTransparentBackground()

Removes the transparent background setting of the image.

Returns

A reference to this ExportOptionsKit.

virtual ~ExportOptionsKit()

Public Static Functions

static ExportOptionsKit GetDefault()

Creates a ExportOptionsKit 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 ExportOptionsKit with the default settings.

Public Static Attributes

static const HPS::Type staticType = HPS::Type::ImageExportOptionsKit