|
Maps SDK for C++ 1.0.0
|


Public Member Functions | |
| Image (const DataBuffer &data, int format) | |
| Create an image object from a data buffer in a specific format formats currently supported are enumerated in EImageFileFormat. | |
| Image (const DataBuffer &data, int format, const Size &size) | |
| Create an image object from a data buffer in a specific format and resize it to the requested dimensions formats currently supported are enumerated in EImageFileFormat. | |
| Image (const String &path) | |
| Create an image object from a given file path. | |
| Image (const String &path, const Size &size) | |
| Create an image object from a given file path and resize it to the requested dimensions. | |
| Image (int id) | |
| Create an image object from an image id. | |
| Image (const Image &)=default | |
| Default copy constructor. | |
| Image (Image &&)=default | |
| Default move constructor noexcept is deduced. | |
| Image & | operator= (const Image &image)=default |
| Default copy assignment. | |
| Image & | operator= (Image &&image)=default |
| Default move assignment noexcept is deduced. | |
| bool | operator== (const Image &img) const noexcept |
| Equal operator. | |
| unsigned | getType () const noexcept |
| Get the type of the image, see EImageType. | |
| unsigned | getUid () const noexcept |
| Get the unique ID of the image. | |
| int | render (IBitmap &bitmap) const noexcept |
| Render the Image into the provided IBitmap. | |
| Size | getSize () const noexcept |
| Get the preferred size of the image. | |
| SizeF | getAspectRatio () const noexcept |
| Get the icon aspect ratio as pair of ( width_aspect, height_aspect ). | |
| float | getAspectRatioF () const noexcept |
| Get the icon aspect ratio as a direct raport width / height. | |
| bool | isScalable () const noexcept |
| Check if icon is scalable ( i.e. | |
| bool | isValid () const noexcept |
| Check the validity of the Image. | |
| template<typename TSpecializedImage> | |
| TSpecializedImage & | cast () noexcept |
| Cast to specialized image. | |
| template<typename TSpecializedImage> | |
| const TSpecializedImage & | cast () const noexcept |
| Cast to const specialized image. | |
| DataBuffer | exportAs (const Size &size, int format) const noexcept |
| Export image as a data buffer in the specified format. | |
| int | exportAs (const Size &size, int format, const String &path) const noexcept |
| Export image to a file in the specified format. | |
Protected Member Functions | |
| template<typename ... TArgs> | |
| StrongPointer< IBitmap > | renderTo (const Size &size, TArgs &&... args) const noexcept |
| Render the Image into a new IBitmap of the specified size, using the provided additional arguments if needed. | |
| template<typename ... TArgs> | |
| DataBuffer | exportTo (const Size &size, int format, TArgs &&... args) const noexcept |
| Export image to a data buffer or file in the specified format, using the provided additional arguments if needed. | |
| template<typename ... TArgs> | |
| int | exportTo (const Size &size, int format, const String &path, TArgs &&... args) const noexcept |
| Export image to a file in the specified format, using the provided additional arguments if needed. | |
Image object.
Implements share-read / copy-on-write Api object over IIcon.
|
inline |
Create an image object from a data buffer in a specific format formats currently supported are enumerated in EImageFileFormat.
| data | Data buffer containing the image |
| format | Data buffer format, see EImageFileFormat |
|
inline |
Create an image object from a data buffer in a specific format and resize it to the requested dimensions formats currently supported are enumerated in EImageFileFormat.
| data | Data buffer containing the image |
| format | Data buffer format, see EImageFileFormat |
| size | Image desired size |
|
inline |
Create an image object from a given file path.
| path | Image file path. Must be an image file in one of the supported file formats, see EImageFileFormat |
Create an image object from a given file path and resize it to the requested dimensions.
| path | Image file path. Must be an image file in one of the supported file formats, see EImageFileFormat |
| size | The side of the image. |
| gem::Image::Image | ( | int | id | ) |
Create an image object from an image id.
| id | Id of image. |
|
inlinenoexcept |
Cast to const specialized image.
|
inlinenoexcept |
Cast to specialized image.
|
inlinenoexcept |
Export image as a data buffer in the specified format.
| [in] | size | The exported image size in pixels |
| [in] | format | The exported image format, see EImageFileFormat |
|
inlinenoexcept |
Export image to a file in the specified format.
| [in] | size | The exported image size in pixels |
| [in] | format | The exported image format, see EImageFileFormat |
| [in] | path | The file path where to save the image |
|
inlineprotectednoexcept |
Export image to a file in the specified format, using the provided additional arguments if needed.
| [in] | size | The exported image size in pixels |
| [in] | format | The exported image format, see EImageFileFormat |
| [in] | path | The file path where to save the image |
| [in] | args | Additional arguments to be forwarded to the Render function, if needed by the specific image type |
|
inlineprotectednoexcept |
Export image to a data buffer or file in the specified format, using the provided additional arguments if needed.
| [in] | size | The exported image size in pixels |
| [in] | format | The exported image format, see EImageFileFormat |
| [in] | args | Additional arguments to be forwarded to the Render function, if needed by the specific image type |
|
inlinenoexcept |
Get the icon aspect ratio as pair of ( width_aspect, height_aspect ).
If width > height return { width / height, 1.f ) If width < height return { 1.f, height / width )
|
inlinenoexcept |
Get the icon aspect ratio as a direct raport width / height.
|
inlinenoexcept |
Get the preferred size of the image.
|
inlinenoexcept |
Get the type of the image, see EImageType.
|
inlinenoexcept |
Get the unique ID of the image.
|
inlinenoexcept |
Check if icon is scalable ( i.e.
it has vectorial format )
|
inlinenoexcept |
Check the validity of the Image.
|
default |
Default copy assignment.
| image | Other image |
|
default |
Default move assignment noexcept is deduced.
| image | Other image |
|
inlinenoexcept |
Equal operator.
| img | Other image. |
|
inlinenoexcept |
|
inlineprotectednoexcept |
Render the Image into a new IBitmap of the specified size, using the provided additional arguments if needed.
| [in] | size | The size of the bitmap to render into |
| [in] | args | Additional arguments to be forwarded to the Render function, if needed by the specific image type |