[技术问答] 谁有完整的ST7735的绘图函数

[复制链接]
 楼主| 捉虫天师 发表于 2024-11-23 17:45 | 显示全部楼层 |阅读模式
我网上下载的只有画矩形和横线竖线的。不完整啊,该如何写?
huangcunxiake 发表于 2024-11-23 18:32 | 显示全部楼层
我也想知道,蹲一个。
huangcunxiake 发表于 2024-11-23 18:33 | 显示全部楼层
买模块的时候人家给的代码只有几个简单的
void LCD_Draw_Circle(unsigned short x0, unsigned short y0, unsigned char r, unsigned short color); //画圆
void LCD_DrawFullCircle(unsigned short Xpos, unsigned short Ypos, unsigned short Radius, unsigned short Color);
void LCD_Fill(unsigned short sx, unsigned short sy, unsigned short ex, unsigned short ey, unsigned short color); //填充区域
void LCD_DrawLine(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2, unsigned short color); //画线
void LCD_DrawRectangle(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2, unsigned short color); //画矩形
wahahaheihei 发表于 2024-11-23 18:59 | 显示全部楼层
使用LVGL,就可以了。
稳稳の幸福 发表于 2024-11-23 21:08 | 显示全部楼层
void ST7735_SPI_SendByte(uint8_t byte);
void ST7735_Init(void);
void ST7735_DrawPixel(uint16_t x, uint16_t y, uint16_t color);
void ST7735_DrawLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t color);

void ST7735_DrawHLine(uint16_t x, uint16_t y, uint16_t length, uint16_t color);
void ST7735_DrawVLine(uint16_t x, uint16_t y, uint16_t length, uint16_t color);

void ST7735_DrawRectangle(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint16_t color);
void ST7735_FillRectangle(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint16_t color);
void ST7735_DrawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color);
void ST7735_DrawCircleHelper( int16_t x0, int16_t y0,int16_t r, uint8_t cornername, uint16_t color);
void ST7735_DrawRoundRect(int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, uint16_t color);
void ST7735_FillCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername, int16_t delta, uint16_t color);
void ST7735_FillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color);
void ST7735_FillRoundRect(int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, uint16_t color) ;
void ST7735_DrawTriangle(int16_t x0, int16_t y0,int16_t x1, int16_t y1,int16_t x2, int16_t y2, uint16_t color);
void ST7735_FillTriangle ( int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color);
void ST7735_DrawString(uint16_t x, uint16_t y, const char *str, uint16_t color, uint16_t bgColor, const FontDef *font);
void ST7735_FillScreen(uint16_t color);
void ST7735_DrawImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const uint8_t *image);
稳稳の幸福 发表于 2024-11-23 21:08 | 显示全部楼层
我写的这些如何
qintian0303 发表于 2024-11-24 09:04 | 显示全部楼层
复杂图形还是要通过LVGL这种比较好,简单图形的逻辑基本上也是比较简单的
 楼主| 捉虫天师 发表于 2024-11-29 17:30 | 显示全部楼层
稳稳の幸福 发表于 2024-11-23 21:08
void ST7735_SPI_SendByte(uint8_t byte);
void ST7735_Init(void);
void ST7735_DrawPixel(uint16_t x, ui ...

具体函数呢,给看看。
xixi2017 发表于 2024-12-14 16:24 来自手机 | 显示全部楼层
一般人不会告诉你,核心技术
您需要登录后才可以回帖 登录 | 注册

本版积分规则

212

主题

3272

帖子

7

粉丝
快速回复 在线客服 返回列表 返回顶部

212

主题

3272

帖子

7

粉丝
快速回复 在线客服 返回列表 返回顶部