Renesas GR-PEACH OpenCV Development / gr-peach-opencv-project-sd-card_update

Fork of gr-peach-opencv-project-sd-card by the do

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mGraphic.hpp Source File

mGraphic.hpp

00001 #ifndef M_GRAPHIC_HPP
00002 #define M_GRAPHIC_HPP
00003 
00004 #include "mbed.h"
00005 
00006 #ifdef  __cplusplus
00007 extern "C" {  /* Start of C Symbol */ 
00008 #endif
00009 
00010 class graphicFrameworkCanvas
00011 {
00012 private:
00013     uint16_t mWidth;
00014     uint16_t mHeight;
00015     uint8_t mBpp;
00016     uint8_t mDrawPoint; // Point per pixel.
00017     uint8_t mSizeHeaderImg; // Bytes
00018     uint8_t * mBufLcd;
00019     
00020     void drawLineNormal(int x1, int y1, int x2, int y2, uint8_t* color);
00021     void drawBresenham1(int x1, int y1, int x2, int y2, uint8_t* color);
00022     void drawBresenham2(int x1, int y1, int x2, int y2, uint8_t* color);
00023     void drawBresenham3(int x1, int y1, int x2, int y2, uint8_t* color);
00024     void drawBresenham4(int x1, int y1, int x2, int y2, uint8_t* color);
00025     
00026 public:
00027     graphicFrameworkCanvas(uint8_t * bufDraw,uint16_t w,uint16_t h, int8_t bpp, 
00028                                     int8_t drawPoint, int8_t sizeHeader);
00029     ~graphicFrameworkCanvas();
00030     void draw_pixel(int x, int y,uint8_t *color);
00031     void draw_pixel(uint8_t * p_buf, int id, int x, int y);
00032     void draw_pixel(uint8_t * p_buf, int id, int x, int y,uint8_t *color);
00033     void drawImage(uint8_t * _img, int _x, int _y);
00034     void drawRect(int x, int y, int width, int height, uint8_t *color);
00035     void drawLine(int x1, int y1, int x2, int y2, uint8_t* color);
00036     void drawCircle(int x0,int y0, int radius, uint8_t* color);
00037 }; // End class graphicFrameworkCanvas
00038 
00039 #ifdef  __cplusplus
00040  }  /* End of C Symbol */ 
00041 #endif
00042 
00043 #endif //M_GRAPHIC_HPP