Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::RoadInfoImage Class Reference

Road info image object. More...

Inheritance diagram for gem::RoadInfoImage:
Collaboration diagram for gem::RoadInfoImage:

Public Member Functions

 RoadInfoImage (const RoadInfoImage &)=default
 Default copy constructor.
 RoadInfoImage (RoadInfoImage &&)=default
 Default move constructor noexcept is deduced.
RoadInfoImage & operator= (const RoadInfoImage &img)=default
 Default copy assignment.
RoadInfoImage & operator= (RoadInfoImage &&img)=default
 Default move assignment noexcept is deduced.
bool operator== (const RoadInfoImage &img) const
 Comparison operator equal.
bool operator!= (const RoadInfoImage &img) const
 Comparison operator not equal.
int render (IAdjustableBitmap &bitmap, const RoadInfoImageRenderSettings &settings) const noexcept
 Render the specified RoadInfoImage into the provided IAdjustableBitmap.
DataBuffer exportAs (const Size &size, int format, const RoadInfoImageRenderSettings &settings) const noexcept
 Export image as a data buffer in the specified format.
int exportAs (const Size &size, int format, const String &path, const RoadInfoImageRenderSettings &settings) const noexcept
 Export image to a file in the specified format.
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< IBitmaprenderTo (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.

Detailed Description

Road info image object.

Member Function Documentation

◆ cast() [1/2]

template<typename TSpecializedImage>
const TSpecializedImage & gem::Image::cast ( ) const
inlinenoexceptinherited

Cast to const specialized image.

Returns
Specialized image

◆ cast() [2/2]

template<typename TSpecializedImage>
TSpecializedImage & gem::Image::cast ( )
inlinenoexceptinherited

Cast to specialized image.

Returns
Specialized image

◆ exportAs() [1/4]

DataBuffer gem::Image::exportAs ( const Size & size,
int format ) const
inlinenoexceptinherited

Export image as a data buffer in the specified format.

Parameters
[in]sizeThe exported image size in pixels
[in]formatThe exported image format, see EImageFileFormat
Returns
Data buffer containing the image in the specified format

◆ exportAs() [2/4]

int gem::Image::exportAs ( const Size & size,
int format,
const String & path ) const
inlinenoexceptinherited

Export image to a file in the specified format.

Parameters
[in]sizeThe exported image size in pixels
[in]formatThe exported image format, see EImageFileFormat
[in]pathThe file path where to save the image
Returns
The opration result code

◆ exportAs() [3/4]

DataBuffer gem::RoadInfoImage::exportAs ( const Size & size,
int format,
const RoadInfoImageRenderSettings & settings ) const
inlinenoexcept

Export image as a data buffer in the specified format.

Parameters
[in]sizeThe exported image size in pixels
[in]formatThe exported image format, see EImageFileFormat
[in]settingsSettings of road info image render.
Returns
Data buffer containing the image in the specified format

◆ exportAs() [4/4]

int gem::RoadInfoImage::exportAs ( const Size & size,
int format,
const String & path,
const RoadInfoImageRenderSettings & settings ) const
inlinenoexcept

Export image to a file in the specified format.

Parameters
[in]sizeThe exported image size in pixels
[in]formatThe exported image format, see EImageFileFormat
[in]pathThe file path where to save the image
[in]settingsSettings of road info image render.
Returns
The opration result code

◆ exportTo() [1/2]

template<typename ... TArgs>
int gem::Image::exportTo ( const Size & size,
int format,
const String & path,
TArgs &&... args ) const
inlineprotectednoexceptinherited

Export image to a file in the specified format, using the provided additional arguments if needed.

Parameters
[in]sizeThe exported image size in pixels
[in]formatThe exported image format, see EImageFileFormat
[in]pathThe file path where to save the image
[in]argsAdditional arguments to be forwarded to the Render function, if needed by the specific image type
Returns
The opration result code

◆ exportTo() [2/2]

template<typename ... TArgs>
DataBuffer gem::Image::exportTo ( const Size & size,
int format,
TArgs &&... args ) const
inlineprotectednoexceptinherited

Export image to a data buffer or file in the specified format, using the provided additional arguments if needed.

Parameters
[in]sizeThe exported image size in pixels
[in]formatThe exported image format, see EImageFileFormat
[in]argsAdditional arguments to be forwarded to the Render function, if needed by the specific image type
Returns
If exporting to data buffer, returns the data buffer containing the image in the specified format.

◆ getAspectRatio()

SizeF gem::Image::getAspectRatio ( ) const
inlinenoexceptinherited

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 )

Returns
The aspect ratio of the image

◆ getAspectRatioF()

float gem::Image::getAspectRatioF ( ) const
inlinenoexceptinherited

Get the icon aspect ratio as a direct raport width / height.

Returns
The aspect ratio of the image

◆ getSize()

Size gem::Image::getSize ( ) const
inlinenoexceptinherited

Get the preferred size of the image.

Returns
The preferred size of the image

◆ getType()

unsigned gem::Image::getType ( ) const
inlinenoexceptinherited

Get the type of the image, see EImageType.

Returns
The type of the image

◆ getUid()

unsigned gem::Image::getUid ( ) const
inlinenoexceptinherited

Get the unique ID of the image.

Returns
The unique ID of the image

◆ isScalable()

bool gem::Image::isScalable ( ) const
inlinenoexceptinherited

Check if icon is scalable ( i.e.

it has vectorial format )

Returns
True if the image is scalable, false otherwise

◆ isValid()

bool gem::Image::isValid ( ) const
inlinenoexceptinherited

Check the validity of the Image.

Returns
True if the image is valid, false otherwise

◆ operator!=()

bool gem::RoadInfoImage::operator!= ( const RoadInfoImage & img) const
inline

Comparison operator not equal.

Parameters
imgOther image
Returns
True if the images are not equal, false otherwise

◆ operator=() [1/2]

RoadInfoImage & gem::RoadInfoImage::operator= ( const RoadInfoImage & img)
default

Default copy assignment.

Parameters
imgOther image
Returns
Reference to this object

◆ operator=() [2/2]

RoadInfoImage & gem::RoadInfoImage::operator= ( RoadInfoImage && img)
default

Default move assignment noexcept is deduced.

Parameters
imgOther image
Returns
Reference to this object

◆ operator==() [1/2]

bool gem::Image::operator== ( const Image & img) const
inlinenoexceptinherited

Equal operator.

Parameters
imgOther image.
Returns
True if the images are equal, false otherwise.

◆ operator==() [2/2]

bool gem::RoadInfoImage::operator== ( const RoadInfoImage & img) const
inline

Comparison operator equal.

Parameters
imgOther image
Returns
True if the images are equal, false otherwise

◆ render() [1/2]

int gem::Image::render ( IBitmap & bitmap) const
inlinenoexceptinherited

Render the Image into the provided IBitmap.

Parameters
[in]bitmapThe IBitmap object where to render the image
Returns
KNoError on success. KNotSupported in case of unsupported encoding.

◆ render() [2/2]

int gem::RoadInfoImage::render ( IAdjustableBitmap & bitmap,
const RoadInfoImageRenderSettings & settings ) const
inlinenoexcept

Render the specified RoadInfoImage into the provided IAdjustableBitmap.

The function will request the bitmap to be adjusted to a specified size in order to get an optimal signpost view

Returns
KNoError on success. KNotSupported in case of unsupported encoding.
Parameters
bitmapBitmap to render into.
settingsSettings of road info image render.

◆ renderTo()

template<typename ... TArgs>
StrongPointer< IBitmap > gem::Image::renderTo ( const Size & size,
TArgs &&... args ) const
inlineprotectednoexceptinherited

Render the Image into a new IBitmap of the specified size, using the provided additional arguments if needed.

Parameters
[in]sizeThe size of the bitmap to render into
[in]argsAdditional arguments to be forwarded to the Render function, if needed by the specific image type
Returns
A StrongPointer to the rendered IBitmap, or an empty StrongPointer if rendering failed.