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