IDS peak ICV v1.1.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 with the target image.
 
void SetColor (const Color &color)
 Sets the color for painting.
 
void SetOpacity (const Opacity &opacity)
 Sets the opacity for painting.
 
Color GetColor () const
 
Opacity GetOpacity () const
 
void Draw (const IDrawable &drawable) const
 Draws the specified drawable object onto the image.
 

Detailed Description

Provides functionality for painting drawable objects on images.

The Painter enables rendering of objects derived from IDrawable onto images. Supported image formats are RGB8, BGR8, RGBa8, and BGRa8.

You can configure drawing properties such as color and opacity using SetColor() and SetOpacity(). If not explicitly configured, default values from detail::DrawingOptions are applied.

peak::icv::Painter painter{ image };
painter.SetOpacity(peak::icv::Opacity(50));
painter.Draw(region);
Since
ids_peak_icv 1.1

Definition at line 44 of file peak_icv_painter.hpp.

Constructor & Destructor Documentation

◆ Painter()

Painter ( Image & image)
inlineexplicit

Constructs a Painter with the target image.

Parameters
imageThe image all painting operations are performed on.
Since
ids_peak_icv 1.1

Definition at line 131 of file peak_icv_painter.hpp.

Member Function Documentation

◆ Draw()

void Draw ( const IDrawable & drawable) const
inline

Draws the specified drawable object onto the image.

The following objects can be drawn:

Refer to the documentation of the specific drawable for more details.

Parameters
drawableThe object to be drawn.
Since
ids_peak_icv 1.1

Definition at line 135 of file peak_icv_painter.hpp.

◆ GetColor()

Color GetColor ( ) const
inline
Returns
The color for painting.
Since
ids_peak_icv 1.1

Definition at line 121 of file peak_icv_painter.hpp.

◆ GetOpacity()

Opacity GetOpacity ( ) const
inline
Returns
The opacity for painting.
Since
ids_peak_icv 1.1

Definition at line 126 of file peak_icv_painter.hpp.

◆ SetColor()

void SetColor ( const Color & color)
inline

Sets the color for painting.

Refer to Color for more information on color configuration.

Parameters
colorThe color to be set.
Since
ids_peak_icv 1.1

Definition at line 111 of file peak_icv_painter.hpp.

◆ SetOpacity()

void SetOpacity ( const Opacity & opacity)
inline

Sets the opacity for painting.

Refer to Opacity for more information on opacity configuration.

Parameters
opacityThe opacity to be set.
Since
ids_peak_icv 1.1

Definition at line 116 of file peak_icv_painter.hpp.