问答

汇集网友智慧,解决技术难题

21ic问答首页 - GC9D01显示问题

blocks IDT Width ck ig ID

GC9D01显示问题

Freemannnn2025-12-09
  1、要是用分块刷新的方式来显示时,左上角或者右上角就会有一个像素点无法显示。像素点分得越细,点就越多无法显示。比如我i让屏幕显示5*5个色块,他每个色块的一个角的那个像素点,都是显示不出来的。
2、如果是使用取模软件,换成数组然后显示的话是可以显示正常的。也就说,调用tft.fillRect(x,y,blockWidth,blockHeight,color);函数就会出问题。
3、刷块代码如下:

void drawcolorBlocks(){
int blockwidth =40;//Width of each block
int blockHeight =40;// Height of each block
int rows = 4;
int cols = 4;
// Number of rows of blocks
//Number of columns of blocks
for(int row=0;row<rows; row++){for(int col=0;col<cols; col++){
uint16_t color =tft.color565(random(8,255),random(8,255),random(0, 255)); // Random cc
int x=col * blockWidth;
int y= row * blockHeight,
// Draw the block at(x,y)with the defined size and colortft.fillRect(x,y,blockWidth,blockHeight,color);}

回答 +关注 1
363人浏览 0人回答问题 分享 举报
0 个回答

您需要登录后才可以回复 登录 | 注册