drawer.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
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
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 }
00070
00071 #endif