IDS peak ICV v1.0.0
Loading...
Searching...
No Matches
Painter Class Reference

#include <peak_icv/painting/peak_icv_painter.hpp>

Public Member Functions

 Painter (Image &image)
 Constructs a Painter object.
 
void SetColor (const Color &color)
 Set the color for painting.
 
void SetOpacity (const Opacity &opacity)
 Sets the opacity for painting.
 
Color GetColor () const
 Retrieve the current color for painting.
 
Opacity GetOpacity () const
 Retrieve the current opacity for painting.
 
void Draw (const IDrawable &drawable) const
 Draws the drawable onto the image, the painter was initialized with. For more info, please see the documentation of the specific object that shall be drawn.
 

Detailed Description

Class for painting simple things (e.g. a region) on images.

With the Painter, objects derived from IDrawable can be drawn in order to visualize them. It is possible to configure the drawing style, including color and opacity settings, for customized results.

The Painter is initialized with the image onto which the object is to be painted. It must be of type RGB8, BGR8, RGBa8 or BGRa8. Optionally, you can configure the painter by setting the color and opacity; if omitted, default values from DrawingOptions are used. Once configured, the object to be rendered can be passed to the draw method, which paints it onto the image.

peak::icv::Painter painter{ image };
painter.SetColor(peak::icv::Color(PEAK_ICV_COLOR_BLUE));
painter.SetOpacity(peak::icv::Opacity(50));
painter.Draw(region);
Warning
This function is still in development and not released.

Definition at line 48 of file peak_icv_painter.hpp.

Constructor & Destructor Documentation

◆ Painter()

Painter ( Image & image)
inlineexplicit

Constructs a Painter object.

Parameters
imageThe image all painting operations are performed on
Warning
This function is still in development and not released.

Definition at line 135 of file peak_icv_painter.hpp.

Member Function Documentation

◆ Draw()

void Draw ( const IDrawable & drawable) const
inline

Draws the drawable onto the image, the painter was initialized with. For more info, please see the documentation of the specific object that shall be drawn.

The following objects can be drawn:

Parameters
drawableThe object to be drawn.
Warning
This function is still in development and not released.

Definition at line 139 of file peak_icv_painter.hpp.

◆ GetColor()

Color GetColor ( ) const
inline

Retrieve the current color for painting.

Returns
The color for painting.
Warning
This function is still in development and not released.

Definition at line 125 of file peak_icv_painter.hpp.

◆ GetOpacity()

Opacity GetOpacity ( ) const
inline

Retrieve the current opacity for painting.

Returns
The opacity for painting.
Warning
This function is still in development and not released.

Definition at line 130 of file peak_icv_painter.hpp.

◆ SetColor()

void SetColor ( const Color & color)
inline

Set the color for painting.

For more information on the color, please refer to the information under Color.

Parameters
colorThe color to set
Warning
This function is still in development and not released.

Definition at line 115 of file peak_icv_painter.hpp.

◆ SetOpacity()

void SetOpacity ( const Opacity & opacity)
inline

Sets the opacity for painting.

For more information on the color, please refer to the information under Opacity.

Parameters
opacityThe opacity to set
Warning
This function is still in development and not released.

Definition at line 120 of file peak_icv_painter.hpp.