Compare commits

...

30 Commits

Author SHA1 Message Date
Polarix
e8bc8f90e6 更新基础绘图中原型填充错误的问题 2025-03-03 11:16:40 +08:00
Polarix
40e16f73b1 合并开发分支修改内容,更新模拟器的实装。 2025-03-03 10:56:39 +08:00
Polarix
ec00bab5b7 修正模拟器环境的清屏幕操作显示效果不正确的问题 2025-03-03 10:38:25 +08:00
Polarix
d6922f3b29
!12 修复了一处错误的设备接口指针检查
Merge pull request !12 from PermissionDenied7335/Stable
2024-12-19 09:33:29 +00:00
PermissionDenied7335
4d79a90036
修复了像素读取中一处错误的设备接口指针检查
Signed-off-by: PermissionDenied7335 <grade6_wty@163.com>
2024-12-11 11:20:32 +00:00
Polarix
0580f20553 Merge branch 'Stable' of https://gitee.com/Polarix/simplegui into Stable 2023-03-24 22:08:27 +08:00
Polarix
36baa087e2 补充基于Unicode编码精简字库的教程资料 2023-03-24 22:08:17 +08:00
Polarix
2adffd0fd6 更新字库精简相关的说明文档 2022-12-13 22:45:30 +08:00
Polarix
86c7d3256d 更新字库精简相关的说明文档 2022-12-13 22:42:44 +08:00
Polarix
98fa4423c2 2022-11-30:
更新wxWidgets环境搭建文档。

# Conflicts:
#	Documents/A1-搭建基于Codeblocks的wxWidgets开发环境.md
2022-12-01 00:00:43 +08:00
Polarix
aeeb18079b 2022-10-27:
更新readme文件
2022-10-27 12:20:39 +08:00
Polarix
25d819f40a 2022-06-24:
修改文本输入框的示例代码,确保不使用定时器时可以操作。
2022-10-26 15:29:55 +08:00
Polarix
f01138be5b 2022-06-02:
增加以UTF-8编码和Unicode为基础的精简字库示例。
2022-10-26 15:29:25 +08:00
Polarix
13f1d2301e 2022-06-01:
修正字符输入框选择字符可能不正确的原因。
改善了实时曲线组件的数据点管理方式,增加前插入和后插入数据接口以便静态使用。
改善了List组件的会绘制接口。
2022-10-26 15:29:13 +08:00
Polarix
c04df7f5a4 2022-04-08:
修正List组件项目绘制位置不正确的问题。
2022-10-26 15:28:35 +08:00
Polarix
547032447c 2022-03-19:
补充接口注释。
修正自述文档的内容。
2022-10-26 15:27:52 +08:00
Polarix
a8a9fde477 update README.md. 2022-10-26 15:27:45 +08:00
Polarix
1c3b488b01 2022-03-19:
删除了Event结构体中的Type元素,只用EventID作为标识。
修正了VariableBox演示代码中按键逻辑的处理错误。
为调整曲线增加了新接口,用于计算曲线范围内任意自变量的因变量。
更新部分错误的代码注释。
2022-10-26 15:24:29 +08:00
Polarix
3af120e4f3 2021-10-09:
在头文件中增加了在C++场景下编译的标记。
移除了“活动区域”的设计。
订正了一些接口宏定义的名字。
修正了一些注释错误。
SimpleGUI的接口中移除了“读像素”的操作。
2022-10-26 15:24:10 +08:00
vnoon
d9b049e1c9 更改几处BUG,添加设置焦点字符数据 2022-10-26 15:23:27 +08:00
Polarix
235fc54f98 2021-08-16:
修正ItemBase向尾部追加项目时画面重绘错误的问题。
修正演示程序中向空列表中添加项目时失败的问题。
修正一些注释的格式错误。
2022-10-26 15:22:48 +08:00
Polarix
6337b1f327 2021-07-16:
为文本输入狂组件添加密码字符功能。
增加单个ASCII字符绘制接口。
调整曲线的调整点焦点绘制方法变更,内部去反色化。
2022-10-26 15:22:44 +08:00
Polarix
73632ac3c9 2021-07-09:
优化了圆和圆角矩形绘制的处理,删除了无用的判断。
2022-10-26 15:22:41 +08:00
Polarix
fb0ac82ca7 2021-07-06:
修正在某些版本的GCC/MinGW下编译错误的问题。
删除未完成的接口。
2022-10-26 15:22:37 +08:00
Polarix
a1bade9cee 2021-07-06:
添加基础的极坐标、三角计算函数。
增加极坐标接口的简单演示程序。
2022-10-26 15:22:32 +08:00
Polarix
7eb27b0a4f 2021-06-18:
修正ItemsBase对象在高度为新项目高度整数倍时,下滚动判断不正确的问题。
2022-10-26 15:21:25 +08:00
Polarix
3a18774d59 2021-06-07:
修正演示文件的资源文件编码错误。
2022-10-26 15:21:08 +08:00
Meco Man
9ab116625b 代码格式整理
将tab键替换为空格
删除每行末尾无用的空格

# Conflicts:
#	DemoProc/src/DemoProc.c
#	GUI/inc/SGUI_Basic.h
#	GUI/inc/SGUI_Typedef.h
#	GUI/src/SGUI_Basic.c
#	GUI/src/SGUI_Curve.c
#	GUI/src/SGUI_Text.c
2022-10-26 15:20:16 +08:00
Polarix
bd8c38476e 2021-04-13:
更新ReadMe,增加新视频链接。
2022-10-26 15:16:22 +08:00
Polarix
5474706551 2021-04-13:
更新文档,增加了“编译器配置错误”发生时的对应处理。
2022-10-26 15:15:30 +08:00
10 changed files with 33 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/*************************************************************************/ /*************************************************************************/
/** Copyright. **/ /** Copyright. **/
/** FileName: RTCNotice.c **/ /** FileName: RTCNotice.c **/
/** Author: Polarix **/ /** Author: Polarix **/

View File

@ -1,4 +1,4 @@
/*************************************************************************/ /*************************************************************************/
/** Copyright. **/ /** Copyright. **/
/** FileName: List.c **/ /** FileName: List.c **/
/** Author: Polarix **/ /** Author: Polarix **/

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -570,7 +570,6 @@ void SGUI_Basic_DrawCircle(SGUI_SCR_DEV* pstDeviceIF, SGUI_INT iCx, SGUI_INT iCy
/*----------------------------------*/ /*----------------------------------*/
SGUI_INT iPosXOffset = iRadius; SGUI_INT iPosXOffset = iRadius;
SGUI_INT iPosYOffset = 0; SGUI_INT iPosYOffset = 0;
SGUI_INT iPosXOffset_Old = -1;
SGUI_INT iXChange = 1 - (iRadius<<1); /* iRadius*2 */ SGUI_INT iXChange = 1 - (iRadius<<1); /* iRadius*2 */
SGUI_INT iYChange = 1; SGUI_INT iYChange = 1;
SGUI_INT iRadiusError = 0; SGUI_INT iRadiusError = 0;
@ -589,13 +588,13 @@ void SGUI_Basic_DrawCircle(SGUI_SCR_DEV* pstDeviceIF, SGUI_INT iCx, SGUI_INT iCy
while(iPosXOffset >= iPosYOffset) while(iPosXOffset >= iPosYOffset)
{ {
// Fill the circle // Fill the circle
if((iRadius > 1) && (eFillColor != SGUI_COLOR_TRANS) && (iPosXOffset_Old != iPosXOffset)) if(eFillColor != SGUI_COLOR_TRANS)
{ {
SGUI_Basic_DrawVerticalLine(pstDeviceIF, iCx-iPosXOffset, iCy-iPosYOffset+1, iCy+iPosYOffset-1, eFillColor); SGUI_Basic_DrawVerticalLine(pstDeviceIF, iCx-iPosXOffset+1, iCy-iPosYOffset, iCy+iPosYOffset, eFillColor);
SGUI_Basic_DrawVerticalLine(pstDeviceIF, iCx+iPosXOffset, iCy-iPosYOffset+1, iCy+iPosYOffset-1, eFillColor); SGUI_Basic_DrawVerticalLine(pstDeviceIF, iCx+iPosXOffset-1, iCy-iPosYOffset, iCy+iPosYOffset, eFillColor);
SGUI_Basic_DrawVerticalLine(pstDeviceIF, iCx-iPosYOffset, iCy-iPosXOffset, iCy+iPosXOffset, eFillColor);
SGUI_Basic_DrawVerticalLine(pstDeviceIF, iCx+iPosYOffset, iCy-iPosXOffset, iCy+iPosXOffset, eFillColor);
} }
SGUI_Basic_DrawVerticalLine(pstDeviceIF, iCx-iPosYOffset, iCy-iPosXOffset+1, iCy+iPosXOffset-1, eFillColor);
SGUI_Basic_DrawVerticalLine(pstDeviceIF, iCx+iPosYOffset, iCy-iPosXOffset+1, iCy+iPosXOffset-1, eFillColor);
// Draw edge. // Draw edge.
SGUI_Basic_DrawPoint(pstDeviceIF, iCx+iPosXOffset, iCy-iPosYOffset, eEdgeColor); /* 0- 45 */ SGUI_Basic_DrawPoint(pstDeviceIF, iCx+iPosXOffset, iCy-iPosYOffset, eEdgeColor); /* 0- 45 */
@ -607,8 +606,6 @@ void SGUI_Basic_DrawCircle(SGUI_SCR_DEV* pstDeviceIF, SGUI_INT iCx, SGUI_INT iCy
SGUI_Basic_DrawPoint(pstDeviceIF, iCx+iPosYOffset, iCy+iPosXOffset, eEdgeColor); /* 270-315 */ SGUI_Basic_DrawPoint(pstDeviceIF, iCx+iPosYOffset, iCy+iPosXOffset, eEdgeColor); /* 270-315 */
SGUI_Basic_DrawPoint(pstDeviceIF, iCx+iPosXOffset, iCy+iPosYOffset, eEdgeColor); /* 315-360 */ SGUI_Basic_DrawPoint(pstDeviceIF, iCx+iPosXOffset, iCy+iPosYOffset, eEdgeColor); /* 315-360 */
iPosXOffset_Old = iPosXOffset;
iPosYOffset++; iPosYOffset++;
iRadiusError += iYChange; iRadiusError += iYChange;
iYChange += 2; iYChange += 2;

BIN
Images/WeiChatQRCode.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

View File

@ -4,7 +4,7 @@
#### 简介 #### 简介
SimpleGUI是一款针对单色显示屏设计的GUI绘图接口库。 SimpleGUI是一款针对单色显示屏设计的接口库。
> ![SimpleGUI在SSD1306主控制器的OLED显示屏上的显示效果](Images/Perview.png "SimpleGUI在SSD1306主控制器的OLED显示屏上的显示效果") > ![SimpleGUI在SSD1306主控制器的OLED显示屏上的显示效果](Images/Perview.png "SimpleGUI在SSD1306主控制器的OLED显示屏上的显示效果")
@ -65,5 +65,19 @@ SimpleGUI发布已经有很长时间了在发布后很多人都来询问一
如果您有意参与SimpleGUI的讨论与改进可以在以下地方留言 如果您有意参与SimpleGUI的讨论与改进可以在以下地方留言
1. 开源中国SimpleGUI页面https://www.oschina.net/p/simplegui 1. 开源中国SimpleGUI页面https://www.oschina.net/p/simplegui
2. 码云页面https://gitee.com/Polarix/simplegui 2. Gitee托管页面https://gitee.com/Polarix/simplegui
3. QQ交流群799501887 3. GitCode托管页面https://gitcode.com/Polarix/SimpleGUI
4. QQ交流群799501887
#### 开发计划
现阶段SimpleGUI正在致力于解决以下问题
- 设计并使用遮罩机制,简化绘图接口,增强表达能力
- 提供极坐标相关的绘图接口
#### 捐助项目
开源项目维护不易,如果您觉得本项目还不错,对您有所帮助,是不是也可以考虑捐助本项目。
![](Images/WeiChatQRCode.png "微信二维码")

View File

@ -200,7 +200,15 @@ void simulator_window::paint_pixel(int pos_x, int pos_y, uint32_t color_hex)
void simulator_window::clear_paint(void) void simulator_window::clear_paint(void)
{ {
::memset(m_paint_buffer, 0x00, sizeof(uint8_t)*(m_width * m_height * SIMULATOR_COLOR_BYTES)); for(int pos_y=0; pos_y<m_height; ++pos_y)
{
for(int pos_x=0; pos_x<m_width; ++pos_x)
{
m_paint_buffer[(pos_y * m_width + pos_x) * SIMULATOR_COLOR_BYTES + 0] = (SIMULATOR_BACKGROUND_COLOR >> 16) & 0xFF;
m_paint_buffer[(pos_y * m_width + pos_x) * SIMULATOR_COLOR_BYTES + 1] = (SIMULATOR_BACKGROUND_COLOR >> 8) & 0xFF;
m_paint_buffer[(pos_y * m_width + pos_x) * SIMULATOR_COLOR_BYTES + 2] = SIMULATOR_BACKGROUND_COLOR & 0xFF;
}
}
} }
void simulator_window::sync_paint_buffer(void) void simulator_window::sync_paint_buffer(void)