Fawkes API  Fawkes Development Version
firevision::MonoDrawer Class Reference

Draw to a monochrome image. More...

#include <>>

Public Member Functions

 MonoDrawer ()
 Constructor. More...
 
 ~MonoDrawer ()
 Destructor. More...
 
void draw_circle (int center_x, int center_y, unsigned int radius)
 Draw circle. More...
 
void draw_rectangle (unsigned int x, unsigned int y, unsigned int w, unsigned int h)
 Draw rectangle. More...
 
void draw_rectangle_inverted (unsigned int x, unsigned int y, unsigned int w, unsigned int h)
 Draw inverted rectangle. More...
 
void draw_point (unsigned int x, unsigned int y)
 Draw point. More...
 
void draw_line (unsigned int x_start, unsigned int y_start, unsigned int x_end, unsigned int y_end)
 Draw line. More...
 
void draw_cross (unsigned int x_center, unsigned int y_center, unsigned int width)
 Draws a cross. More...
 
void set_buffer (unsigned char *buffer, unsigned int width, unsigned int height)
 Set the buffer to draw to. More...
 
void set_brightness (unsigned char b)
 Set drawing brightness. More...
 
void set_overlap (bool o)
 Enable/Disable transparency (overlapping pixels increase brightness). More...
 

Detailed Description

Draw to a monochrome image.

Author
Tim Niemueller (Base)
Bahram Maleki-Fard (Modification)

Definition at line 35 of file mono_drawer.h.

Constructor & Destructor Documentation

◆ MonoDrawer()

firevision::MonoDrawer::MonoDrawer ( )

Constructor.

Definition at line 52 of file mono_drawer.cpp.

◆ ~MonoDrawer()

firevision::MonoDrawer::~MonoDrawer ( )

Destructor.

Definition at line 60 of file mono_drawer.cpp.

Member Function Documentation

◆ draw_circle()

void firevision::MonoDrawer::draw_circle ( int  center_x,
int  center_y,
unsigned int  radius 
)

Draw circle.

Draws a circle at the given center point and with the given radius.

Parameters
center_xx coordinate of circle center
center_yy coordinate of circle center
radiusradius of circle

Definition at line 107 of file mono_drawer.cpp.

◆ draw_cross()

void firevision::MonoDrawer::draw_cross ( unsigned int  x_center,
unsigned int  y_center,
unsigned int  width 
)

Draws a cross.

Parameters
x_centerCenter of the cross
y_centerCenter of the cross
widthof the bars

Definition at line 361 of file mono_drawer.cpp.

References draw_line().

◆ draw_line()

void firevision::MonoDrawer::draw_line ( unsigned int  x_start,
unsigned int  y_start,
unsigned int  x_end,
unsigned int  y_end 
)

Draw line.

Standard Bresenham in all directions. For in-depth information have a look at http://de.wikipedia.org/wiki/Bresenham-Algorithmus

Parameters
x_startx coordinate of start point
y_starty coordinate of start point
x_endx coordinate of end point
y_endy coordinate of end point

Definition at line 282 of file mono_drawer.cpp.

Referenced by draw_cross().

◆ draw_point()

void firevision::MonoDrawer::draw_point ( unsigned int  x,
unsigned int  y 
)

Draw point.

Parameters
xx coordinate of point
yy coordinate of point

Definition at line 264 of file mono_drawer.cpp.

◆ draw_rectangle()

void firevision::MonoDrawer::draw_rectangle ( unsigned int  x,
unsigned int  y,
unsigned int  w,
unsigned int  h 
)

Draw rectangle.

Parameters
xx coordinate of rectangle's upper left corner
yy coordinate of rectangle's upper left corner
wwidth of rectangle from x to the right
hheight of rectangle from y to the bottom

Definition at line 173 of file mono_drawer.cpp.

◆ draw_rectangle_inverted()

void firevision::MonoDrawer::draw_rectangle_inverted ( unsigned int  x,
unsigned int  y,
unsigned int  w,
unsigned int  h 
)

Draw inverted rectangle.

This draws a rectangle but instead of using the draw color it is drawn in the inverted color of the pixel where it is drawn.

Parameters
xx coordinate of rectangle's upper left corner
yy coordinate of rectangle's upper left corner
wwidth of rectangle from x to the right
hheight of rectangle from y to the bottom

Definition at line 218 of file mono_drawer.cpp.

◆ set_brightness()

void firevision::MonoDrawer::set_brightness ( unsigned char  b)

Set drawing brightness.

Parameters
bbrightness; 0-255

Definition at line 84 of file mono_drawer.cpp.

◆ set_buffer()

void firevision::MonoDrawer::set_buffer ( unsigned char *  buffer,
unsigned int  width,
unsigned int  height 
)

Set the buffer to draw to.

Parameters
bufferbuffer to draw to, must be MONO8 formatted. E.g. Y-plane of YUV
widthwidth of the buffer
heightheight of the buffer

Definition at line 71 of file mono_drawer.cpp.

◆ set_overlap()

void firevision::MonoDrawer::set_overlap ( bool  o)

Enable/Disable transparency (overlapping pixels increase brightness).

Parameters
ooverlapping true/false

Definition at line 94 of file mono_drawer.cpp.


The documentation for this class was generated from the following files: