tft.drawTriangle(x1,y1,x2,y2,x3,y3,t); //drawTriangle(int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t x3, int16_t y3, uint16_t t)tft.fillTriangle(x1,y1,x2,y2,x3,y3,t); //fillTriangle(int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_...
这个smile是数组的名称,可以自行修改,下面有个drawBitmap()函数,这是专门用来显示点阵像素用的,几个参数代表X坐标,Y坐标,宽度、高度、图像名称、1表示文字亮,0表示文字灭,最后一个参数是背景,0表示关闭,1表示打开,建议第一次用的时候跟我一样即可。 下面最重要的一步,把刚才取模软件里的数据复制到这个smile数组...
<p><font size="4">tft.drawFastVLine(x,y,h,t); //drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t t)</font></p><p><font size="4">tft.drawFastHLine(x,y,w,t); //drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t t)</font></p><p><fon...
void TFT_eSPI::drawBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color) void TFT_eSPI::drawBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t fgcolor, uint16_t bgcolor) 1. 2. 发送8bit...
#include "bitmap_RGB.h" // when you want to display a bitmap image from library #include "...
tft.drawBitmap(x, y, tractor_128x64, 128, 64, BLUE); msg_time(0, y + 66, F("drawBitmap() transparent flash "), t); y = 80; t = millis(); tft.drawBitmap(x, y, tractor_128x64, 128, 64, RED, YELLOW); msg_time(0, y + 66, F("drawBitmap() background flash ")...
drawHanzi(int32_tx,int32_ty,constcharc[3],uint32_tcolor){//显示单一汉字for(intk=0;k<5;k++)if(hanzi16[k].Index[0]==c[0]&&hanzi16[k].Index[1]==c[1]&&hanzi16[k].Index[2]==c[2]){tft.drawBitmap(x,y,hanzi16[k].hz16_Id,hanzi16[k].hz_width,16,color);}}voiddraw...
tft.draw16bitRGBBitmap(x, y, bitmap, w, h); // Return 1 to decode next block return 1; } void init_camera() { camera_config_t config; config.ledc_channel = LEDC_CHANNEL_0; config.ledc_timer = LEDC_TIMER_0; config.pin_d0 = Y2_GPIO_NUM; ...
// tft.drawRGBBitmap(0, 0, liuying1_0, 128, 160); // 用于壁纸显示的代码 // 屏幕引脚定义 #define TFT_CS 5 #define TFT_RST 12 #define TFT_DC 32 #define TFT_SCLK 18 #define TFT_MOSI 23 #include <TFT_eSPI.h> #include <U8g2_for_TFT_eSPI.h> #include "bizhi.h" //导入壁纸...
tft.drawBitmap(x, y, tractor_128x64, 128, 64, BLUE); msg_time(0, y + 66, F("drawBitmap() transparent flash "), t); y = 80; t = millis(); tft.drawBitmap(x, y, tractor_128x64, 128, 64, RED, YELLOW); msg_time(0, y + 66, F("drawBitmap() background flash ")...