mirror of
https://gitee.com/Polarix/simplegui.git
synced 2025-06-18 14:07:53 +00:00
Compare commits
No commits in common. "e8bc8f90e639f68d07ecb1e67028dd10bc6d521d" and "e7978fa417a87da522ed67da6e79b0e7f42503c2" have entirely different histories.
e8bc8f90e6
...
e7978fa417
@ -1,4 +1,4 @@
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/** Copyright. **/
|
||||
/** FileName: RTCNotice.c **/
|
||||
/** Author: Polarix **/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/** Copyright. **/
|
||||
/** FileName: List.c **/
|
||||
/** Author: Polarix **/
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 225 KiB |
Binary file not shown.
Before Width: | Height: | Size: 46 KiB |
Binary file not shown.
Before Width: | Height: | Size: 75 KiB |
Binary file not shown.
Before Width: | Height: | Size: 21 KiB |
@ -570,6 +570,7 @@ void SGUI_Basic_DrawCircle(SGUI_SCR_DEV* pstDeviceIF, SGUI_INT iCx, SGUI_INT iCy
|
||||
/*----------------------------------*/
|
||||
SGUI_INT iPosXOffset = iRadius;
|
||||
SGUI_INT iPosYOffset = 0;
|
||||
SGUI_INT iPosXOffset_Old = -1;
|
||||
SGUI_INT iXChange = 1 - (iRadius<<1); /* iRadius*2 */
|
||||
SGUI_INT iYChange = 1;
|
||||
SGUI_INT iRadiusError = 0;
|
||||
@ -588,13 +589,13 @@ void SGUI_Basic_DrawCircle(SGUI_SCR_DEV* pstDeviceIF, SGUI_INT iCx, SGUI_INT iCy
|
||||
while(iPosXOffset >= iPosYOffset)
|
||||
{
|
||||
// Fill the circle
|
||||
if(eFillColor != SGUI_COLOR_TRANS)
|
||||
if((iRadius > 1) && (eFillColor != SGUI_COLOR_TRANS) && (iPosXOffset_Old != iPosXOffset))
|
||||
{
|
||||
SGUI_Basic_DrawVerticalLine(pstDeviceIF, iCx-iPosXOffset+1, iCy-iPosYOffset, iCy+iPosYOffset, 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-iPosXOffset, iCy-iPosYOffset+1, iCy+iPosYOffset-1, eFillColor);
|
||||
SGUI_Basic_DrawVerticalLine(pstDeviceIF, iCx+iPosXOffset, iCy-iPosYOffset+1, iCy+iPosYOffset-1, 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.
|
||||
SGUI_Basic_DrawPoint(pstDeviceIF, iCx+iPosXOffset, iCy-iPosYOffset, eEdgeColor); /* 0- 45 */
|
||||
@ -606,6 +607,8 @@ 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+iPosXOffset, iCy+iPosYOffset, eEdgeColor); /* 315-360 */
|
||||
|
||||
iPosXOffset_Old = iPosXOffset;
|
||||
|
||||
iPosYOffset++;
|
||||
iRadiusError += iYChange;
|
||||
iYChange += 2;
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 125 KiB |
20
README.md
20
README.md
@ -4,7 +4,7 @@
|
||||
|
||||
#### 简介
|
||||
|
||||
SimpleGUI是一款针对单色显示屏设计的接口库。
|
||||
SimpleGUI是一款针对单色显示屏设计的GUI绘图接口库。
|
||||
|
||||
> 
|
||||
|
||||
@ -65,19 +65,5 @@ SimpleGUI发布已经有很长时间了,在发布后很多人都来询问一
|
||||
如果您有意参与SimpleGUI的讨论与改进,可以在以下地方留言:
|
||||
|
||||
1. 开源中国SimpleGUI页面:https://www.oschina.net/p/simplegui
|
||||
2. Gitee托管页面:https://gitee.com/Polarix/simplegui
|
||||
3. GitCode托管页面:https://gitcode.com/Polarix/SimpleGUI
|
||||
4. QQ交流群:799501887
|
||||
|
||||
#### 开发计划
|
||||
|
||||
现阶段,SimpleGUI正在致力于解决以下问题
|
||||
|
||||
- 设计并使用遮罩机制,简化绘图接口,增强表达能力
|
||||
- 提供极坐标相关的绘图接口
|
||||
|
||||
#### 捐助项目
|
||||
|
||||
开源项目维护不易,如果您觉得本项目还不错,对您有所帮助,是不是也可以考虑捐助本项目。
|
||||
|
||||

|
||||
2. 码云页面:https://gitee.com/Polarix/simplegui
|
||||
3. QQ交流群:799501887
|
@ -200,15 +200,7 @@ void simulator_window::paint_pixel(int pos_x, int pos_y, uint32_t color_hex)
|
||||
|
||||
void simulator_window::clear_paint(void)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
::memset(m_paint_buffer, 0x00, sizeof(uint8_t)*(m_width * m_height * SIMULATOR_COLOR_BYTES));
|
||||
}
|
||||
|
||||
void simulator_window::sync_paint_buffer(void)
|
||||
|
Loading…
Reference in New Issue
Block a user