Fawkes API Fawkes Development Version
mono_drawer.h
1
2/***************************************************************************
3 * mono_drawer.h - Drawer allows to draw arbitrarily in a buffer
4 *
5 * Generated: Wed Feb 08 20:30:00 2006
6 * Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7 * 2010 Bahram Maleki-Fard
8 *
9 ****************************************************************************/
10
11/* This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version. A runtime exception applies to
15 * this software (see LICENSE.GPL_WRE file mentioned below for details).
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU Library General Public License for more details.
21 *
22 * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
23 */
24
25#ifndef _FIREVISION_FVUTILS_MONO_DRAWER_H_
26#define _FIREVISION_FVUTILS_MONO_DRAWER_H_
27
28#include <fvutils/color/yuv.h>
29
30namespace firevision {
31
33{
34public:
35 MonoDrawer();
37
38 void draw_circle(int center_x, int center_y, unsigned int radius);
39
40 void draw_rectangle(unsigned int x, unsigned int y, unsigned int w, unsigned int h);
41
42 void draw_rectangle_inverted(unsigned int x, unsigned int y, unsigned int w, unsigned int h);
43
44 void draw_point(unsigned int x, unsigned int y);
45 void
46 draw_line(unsigned int x_start, unsigned int y_start, unsigned int x_end, unsigned int y_end);
47 void draw_cross(unsigned int x_center, unsigned int y_center, unsigned int width);
48
49 void set_buffer(unsigned char *buffer, unsigned int width, unsigned int height);
50
51 void set_brightness(unsigned char b);
52 void set_overlap(bool o);
53
54private:
55 unsigned char *buffer_;
56 unsigned int width_;
57 unsigned int height_;
58 unsigned char brightness_;
59 bool overlap_;
60};
61
62} // end namespace firevision
63
64#endif
Draw to a monochrome image.
Definition: mono_drawer.h:33
MonoDrawer()
Constructor.
Definition: mono_drawer.cpp:49
void set_brightness(unsigned char b)
Set drawing brightness.
Definition: mono_drawer.cpp:78
void draw_rectangle(unsigned int x, unsigned int y, unsigned int w, unsigned int h)
Draw rectangle.
~MonoDrawer()
Destructor.
Definition: mono_drawer.cpp:57
void draw_cross(unsigned int x_center, unsigned int y_center, unsigned int width)
Draws a cross.
void set_overlap(bool o)
Enable/Disable transparency (overlapping pixels increase brightness).
Definition: mono_drawer.cpp:87
void draw_circle(int center_x, int center_y, unsigned int radius)
Draw circle.
Definition: mono_drawer.cpp:99
void draw_rectangle_inverted(unsigned int x, unsigned int y, unsigned int w, unsigned int h)
Draw inverted rectangle.
void draw_point(unsigned int x, unsigned int y)
Draw point.
void draw_line(unsigned int x_start, unsigned int y_start, unsigned int x_end, unsigned int y_end)
Draw line.
void set_buffer(unsigned char *buffer, unsigned int width, unsigned int height)
Set the buffer to draw to.
Definition: mono_drawer.cpp:67