Opencv 3.1 project on GR-PEACH board

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

Committer:
thedo
Date:
Tue Jul 04 06:23:13 2017 +0000
Revision:
170:54ff26da7eb6
Parent:
166:3a9487d57a5c
project opencv 3.1 on GR PEACH board, no use SD card.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
thedo 166:3a9487d57a5c 1 #ifndef M_GRAPHIC_HPP
thedo 166:3a9487d57a5c 2 #define M_GRAPHIC_HPP
thedo 166:3a9487d57a5c 3
thedo 166:3a9487d57a5c 4 #include "mbed.h"
thedo 166:3a9487d57a5c 5
thedo 166:3a9487d57a5c 6 #ifdef __cplusplus
thedo 166:3a9487d57a5c 7 extern "C" { /* Start of C Symbol */
thedo 166:3a9487d57a5c 8 #endif
thedo 166:3a9487d57a5c 9
thedo 166:3a9487d57a5c 10 class graphicFrameworkCanvas
thedo 166:3a9487d57a5c 11 {
thedo 166:3a9487d57a5c 12 private:
thedo 166:3a9487d57a5c 13 uint16_t mWidth;
thedo 166:3a9487d57a5c 14 uint16_t mHeight;
thedo 166:3a9487d57a5c 15 uint8_t mBpp;
thedo 166:3a9487d57a5c 16 uint8_t mDrawPoint; // Point per pixel.
thedo 166:3a9487d57a5c 17 uint8_t mSizeHeaderImg; // Bytes
thedo 166:3a9487d57a5c 18 uint8_t * mBufLcd;
thedo 166:3a9487d57a5c 19
thedo 166:3a9487d57a5c 20 void drawLineNormal(int x1, int y1, int x2, int y2, uint8_t* color);
thedo 166:3a9487d57a5c 21 void drawBresenham1(int x1, int y1, int x2, int y2, uint8_t* color);
thedo 166:3a9487d57a5c 22 void drawBresenham2(int x1, int y1, int x2, int y2, uint8_t* color);
thedo 166:3a9487d57a5c 23 void drawBresenham3(int x1, int y1, int x2, int y2, uint8_t* color);
thedo 166:3a9487d57a5c 24 void drawBresenham4(int x1, int y1, int x2, int y2, uint8_t* color);
thedo 166:3a9487d57a5c 25
thedo 166:3a9487d57a5c 26 public:
thedo 166:3a9487d57a5c 27 graphicFrameworkCanvas(uint8_t * bufDraw,uint16_t w,uint16_t h, int8_t bpp,
thedo 166:3a9487d57a5c 28 int8_t drawPoint, int8_t sizeHeader);
thedo 166:3a9487d57a5c 29 ~graphicFrameworkCanvas();
thedo 166:3a9487d57a5c 30 void draw_pixel(int x, int y,uint8_t *color);
thedo 166:3a9487d57a5c 31 void draw_pixel(uint8_t * p_buf, int id, int x, int y,uint8_t *color);
thedo 166:3a9487d57a5c 32 void drawImage(uint8_t * _img, int _x, int _y);
thedo 166:3a9487d57a5c 33 void drawRect(int x, int y, int width, int height, uint8_t *color);
thedo 166:3a9487d57a5c 34 void drawLine(int x1, int y1, int x2, int y2, uint8_t* color);
thedo 166:3a9487d57a5c 35 void drawCircle(int x0,int y0, int radius, uint8_t* color);
thedo 166:3a9487d57a5c 36 }; // End class graphicFrameworkCanvas
thedo 166:3a9487d57a5c 37
thedo 166:3a9487d57a5c 38 #ifdef __cplusplus
thedo 166:3a9487d57a5c 39 } /* End of C Symbol */
thedo 166:3a9487d57a5c 40 #endif
thedo 166:3a9487d57a5c 41
thedo 166:3a9487d57a5c 42 #endif //M_GRAPHIC_HPP