HPS::Image::ImportOptionsKit
-
class HPS::Image::ImportOptionsKit : public HPS::Kit
The ImportOptionsKit class contains options that will be used to import image files and will be set on the ImageKit returned by File::Import.
Public Functions
-
virtual bool Empty() const
Indicates whether this ImportOptionsKit has any values set on it.
- Returns
true if no values are set on this ImportOptionsKit, false otherwise.
-
bool Equals(ImportOptionsKit const &in_kit) const
Check if the source ImportOptionsKit is equivalent to this ImportOptionsKit.
- Parameters
in_kit – The source ImportOptionsKit to compare to this ImportOptionsKit.
- Returns
true if the objects are equivalent, false otherwise.
-
ImportOptionsKit()
The default constructor creates an empty ImportOptionsKit object.
-
ImportOptionsKit(ImportOptionsKit &&in_that)
The move constructor creates an ImportOptionsKit by transferring the underlying impl of the rvalue reference to this ImportOptionsKit thereby avoiding a copy and allocation.
- Parameters
in_that – An rvalue reference to an ImportOptionsKit to take the impl from.
-
ImportOptionsKit(ImportOptionsKit const &in_kit)
The copy constructor creates a new ImportOptionsKit object that contains the same settings as the source ImportOptionsKit.
- Parameters
in_kit – The source ImportOptionsKit 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!=(ImportOptionsKit const &in_kit) const
Check if the source ImportOptionsKit is not equivalent to this ImportOptionsKit.
- Parameters
in_kit – The source ImportOptionsKit to compare to this ImportOptionsKit.
- Returns
true if the objects are not equivalent, false otherwise.
-
ImportOptionsKit &operator=(ImportOptionsKit &&in_that)
The move assignment operator transfers the underlying impl of the rvalue reference to this ImportOptionsKit thereby avoiding a copy.
- Parameters
in_that – An rvalue reference to an ImportOptionsKit to take the impl from.
- Returns
A reference to this ImportOptionsKit.
-
ImportOptionsKit &operator=(ImportOptionsKit const &in_kit)
Copies the source ImportOptionsKit into this ImportOptionsKit.
- Parameters
in_kit – The source ImportOptionsKit to copy.
- Returns
A reference to this ImportOptionsKit.
-
bool operator==(ImportOptionsKit const &in_kit) const
Check if the source ImportOptionsKit is equivalent to this ImportOptionsKit.
- Parameters
in_kit – The source ImportOptionsKit to compare to this ImportOptionsKit.
- Returns
true if the objects are equivalent, false otherwise.
-
void Set(ImportOptionsKit const &in_kit)
Copies the source ImportOptionsKit into this ImportOptionsKit.
- Parameters
in_kit – The source ImportOptionsKit to copy.
-
ImportOptionsKit &SetCompressionQuality(float in_quality)
Sets the compression quality for the image. This setting will be copied over to the ImageKit returned from File::Import. It doesn’t need to be set for the import to succeed.
- Parameters
in_quality – The compression quality for the image.
- Returns
A reference to this ImportOptionsKit.
-
ImportOptionsKit &SetDownSampling(bool in_state)
Sets whether to down-sample the image. This setting will be copied over to the ImageKit returned from File::Import. It doesn’t need to be set for the import to succeed.
- Parameters
in_state – Whether to down-sample the image.
- Returns
A reference to this ImportOptionsKit.
-
ImportOptionsKit &SetFormat(Image::Format in_format)
Sets the format of the image. This must be specified when importing any image.
- Parameters
in_format – The format of the image.
- Returns
A reference to this ImportOptionsKit.
-
ImportOptionsKit &SetSize(unsigned int in_width, unsigned int in_height)
Sets the width and height (in pixels) of the image. This does not need to be set when importing image files which contain this information (i.e., Image::Jpeg, Image::Png or Image::Targa). If this is not specified for images files which do not contain this information, an exception will be thrown on import.
- Parameters
in_width – The width (in pixels) of the image.
in_height – The height (in pixels) of the image.
- Returns
A reference to this ImportOptionsKit.
-
void Show(ImportOptionsKit &out_kit) const
Copies this ImportOptionsKit into the given ImportOptionsKit.
- Parameters
out_kit – The ImportOptionsKit to populate with the contents of this ImportOptionsKit.
-
bool ShowCompressionQuality(float &out_quality) const
Shows the compression quality for the image.
- Parameters
out_quality – The compression quality for the image.
- Returns
true if the compression quality is valid, false otherwise.
-
bool ShowDownSampling(bool &out_state) const
Shows whether to down-sample the image.
- Parameters
out_state – whether to down-sample the image.
- Returns
true if the flag is valid, false otherwise.
-
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.
-
ImportOptionsKit &UnsetCompressionQuality()
Removes the compression quality for the image.
- Returns
A reference to this ImportOptionsKit.
-
ImportOptionsKit &UnsetDownSampling()
Removes whether to down-sample the image.
- Returns
A reference to this ImportOptionsKit.
-
ImportOptionsKit &UnsetEverything()
Removes all settings from this ImportOptionsKit.
- Returns
A reference to this ImportOptionsKit.
-
ImportOptionsKit &UnsetFormat()
Removes the format of the image.
- Returns
A reference to this ImportOptionsKit.
-
ImportOptionsKit &UnsetSize()
Removes the width and height of the image.
- Returns
A reference to this ImportOptionsKit.
-
virtual ~ImportOptionsKit()
Public Static Attributes
-
static const HPS::Type staticType = HPS::Type::ImageImportOptionsKit
-
virtual bool Empty() const