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 class Drawer {
00030
00031 public:
00032 Drawer();
00033 ~Drawer();
00034
00035 void draw_circle(int center_x, int center_y, unsigned int radius);
00036
00037 void draw_rectangle(unsigned int x, unsigned int y,
00038 unsigned int w, unsigned int h);
00039
00040 void draw_rectangle_inverted(unsigned int x, unsigned int y,
00041 unsigned int w, unsigned int h);
00042
00043 void draw_point(unsigned int x, unsigned int y);
00044 void color_point(unsigned int x, unsigned int y);
00045 void color_point(unsigned int x, unsigned int y, YUV_t color);
00046 void draw_line(unsigned int x_start, unsigned int y_start,
00047 unsigned int x_end, unsigned int y_end);
00048 void draw_cross(unsigned int x_center, unsigned int y_center, unsigned int width);
00049
00050 void set_buffer(unsigned char *buffer,
00051 unsigned int width, unsigned int height);
00052
00053 void set_color(unsigned char y, unsigned char u, unsigned char v);
00054 void set_color(YUV_t color);
00055
00056 private:
00057 unsigned char *__buffer;
00058 unsigned int __width;
00059 unsigned int __height;
00060 YUV_t __color;
00061
00062 };
00063
00064
00065 #endif