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

RenderingUtils object. More...

Inheritance diagram for gem::RenderingUtils:
Collaboration diagram for gem::RenderingUtils:

Public Member Functions

 RenderingUtils (const RenderingUtils &)=delete
 RenderingUtils (RenderingUtils &&renderingUtils)=default
 Default move constructor noexcept is deduced.
RenderingUtils & operator= (const RenderingUtils &)=delete
RenderingUtils & operator= (RenderingUtils &&renderingUtils)=default
 Default move assignment noexcept is deduced.
void drawText (IBitmap &bitmap, String const &text, int fontSize, Xy const &topLeft=Xy(), Rgba const &fontColor=Rgba(), int outerSize=0, Rgba const outerColor=Rgba(), float angle=0)
 Render the specified text using the specified parameters into a bitmap.
Size getTextSize (String const &text, int fontSize)
 Get the specified text size.

Detailed Description

RenderingUtils object.

Implements share-read / write Api object over IRenderingUtils.

This behaves like a singleton, i.e. all instances are sharing behind the same API interface

Constructor & Destructor Documentation

◆ RenderingUtils()

gem::RenderingUtils::RenderingUtils ( RenderingUtils && renderingUtils)
default

Default move constructor noexcept is deduced.

Parameters
renderingUtilsThe source object

Member Function Documentation

◆ drawText()

void gem::RenderingUtils::drawText ( IBitmap & bitmap,
String const & text,
int fontSize,
Xy const & topLeft = Xy(),
Rgba const & fontColor = Rgba(),
int outerSize = 0,
Rgba const outerColor = Rgba(),
float angle = 0 )
inline

Render the specified text using the specified parameters into a bitmap.

Parameters
[out]bitmapThe target bitmap
[in]textThe text to render
[in]fontSizeThe font size
[in]topLeftThe top left corner of the text
[in]fontColorThe font color
[in]outerSizeThe outer size
[in]outerColorThe outer color
[in]angleThe rotation angle

◆ getTextSize()

Size gem::RenderingUtils::getTextSize ( String const & text,
int fontSize )
inline

Get the specified text size.

Parameters
[in]textThe text to measure
[in]fontSizeThe font size
Returns
The text size

◆ operator=()

RenderingUtils & gem::RenderingUtils::operator= ( RenderingUtils && renderingUtils)
default

Default move assignment noexcept is deduced.

Parameters
renderingUtilsThe source object
Returns
The target object