Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EALib I2S LM75B SDFileSystem mbed
Graphics.h
00001 00002 #ifndef GRAPHICS_H 00003 #define GRAPHICS_H 00004 00005 /** 00006 * LcdController example 00007 * 00008 * @code 00009 * #include "mbed.h" 00010 * #include "LcdController.h" 00011 * 00012 * LcdController::Config innolux( 00013 * 45, 00014 * 17, 00015 * 2, 00016 * 800, 00017 * 22, 00018 * 22, 00019 * 2, 00020 * 480, 00021 * false, 00022 * false, 00023 * true, 00024 * true, 00025 * true, 00026 * LcdController::Bpp_16_565, 00027 * 36000000, 00028 * LcdController::Tft, 00029 * false); 00030 * 00031 * int main(void) { 00032 * LcdController lcd; 00033 * 00034 * lcd.open(&innolux); 00035 * lcd.setFrameBuffer(frameBuffer); 00036 * lcd.setPower(true); 00037 * 00038 * // draw on the frame buffer 00039 * ... 00040 * } 00041 * @endcode 00042 */ 00043 class Graphics { 00044 public: 00045 00046 Graphics(uint16_t *pFrmBuf, uint16_t dispWidth, uint16_t dispHeight); 00047 00048 void setFrameBuffer( uint16_t *pFrmBuf ); 00049 void put_line(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int16_t color); 00050 void put_circle( int32_t cx, int32_t cy, int16_t color, int32_t radius, int32_t Filled ); 00051 void put_dot( int32_t cx, int32_t cy, int16_t color ); 00052 00053 protected: 00054 uint16_t windowX; 00055 uint16_t windowY; 00056 uint16_t *pFrmBuf; 00057 00058 int32_t abs(int32_t v1) const; 00059 00060 virtual void plot4points( int32_t cx, int32_t cy, int32_t x, int32_t y, int16_t color, int32_t Filled ); 00061 void plot8points( int32_t cx, int32_t cy, int32_t x, int32_t y, int16_t color, int32_t Filled ); 00062 00063 }; 00064 00065 #endif 00066 00067 00068
Generated on Sun Jul 17 2022 08:29:10 by
