Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * mono_drawer.h - Drawer allows to draw arbitrarily in a buffer 00004 * 00005 * Generated: Wed Feb 08 20:30:00 2006 00006 * Copyright 2005-2007 Tim Niemueller [www.niemueller.de] 00007 * 2010 Bahram Maleki-Fard 00008 * 00009 ****************************************************************************/ 00010 00011 /* This program is free software; you can redistribute it and/or modify 00012 * it under the terms of the GNU General Public License as published by 00013 * the Free Software Foundation; either version 2 of the License, or 00014 * (at your option) any later version. A runtime exception applies to 00015 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00016 * 00017 * This program is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU Library General Public License for more details. 00021 * 00022 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00023 */ 00024 00025 #ifndef __FIREVISION_FVUTILS_MONO_DRAWER_H_ 00026 #define __FIREVISION_FVUTILS_MONO_DRAWER_H_ 00027 00028 #include <fvutils/color/yuv.h> 00029 00030 namespace firevision { 00031 #if 0 /* just to make Emacs auto-indent happy */ 00032 } 00033 #endif 00034 00035 class MonoDrawer { 00036 00037 public: 00038 MonoDrawer(); 00039 ~MonoDrawer(); 00040 00041 void draw_circle(int center_x, int center_y, unsigned int radius); 00042 00043 void draw_rectangle(unsigned int x, unsigned int y, 00044 unsigned int w, unsigned int h); 00045 00046 void draw_rectangle_inverted(unsigned int x, unsigned int y, 00047 unsigned int w, unsigned int h); 00048 00049 void draw_point(unsigned int x, unsigned int y); 00050 void draw_line(unsigned int x_start, unsigned int y_start, 00051 unsigned int x_end, unsigned int y_end); 00052 void draw_cross(unsigned int x_center, unsigned int y_center, unsigned int width); 00053 00054 void set_buffer(unsigned char *buffer, 00055 unsigned int width, unsigned int height); 00056 00057 void set_brightness(unsigned char b); 00058 void set_overlap(bool o); 00059 00060 private: 00061 unsigned char *__buffer; 00062 unsigned int __width; 00063 unsigned int __height; 00064 unsigned char __brightness; 00065 bool __overlap; 00066 00067 }; 00068 00069 } // end namespace firevision 00070 00071 #endif