Comments (5)
When I add the lines below to the end of UG_FillRoundFrame function it fixes that.
UG_DrawArc(x1+r, y1+r, r, 0x0C, c); UG_DrawArc(x2-r, y1+r, r, 0x03, c); UG_DrawArc(x1+r, y2-r, r, 0x30, c); UG_DrawArc(x2-r, y2-r, r, 0xC0, c);
I pulled them out of UG_DrawRoundFrame.
from st7789-stm32-ugui.
Maybe... ?
void UG_FillRoundFrame( UG_S16 x1, UG_S16 y1, UG_S16 x2, UG_S16 y2, UG_S16 r, UG_COLOR c )
{
UG_S16 x,y,xd;
if ( x2 < x1 )
swap(x1,x2);
if ( y2 < y1 )
swap(y1,y2);
if ( r<=0 ) return;
xd = 3 - (r << 1);
x = 0;
y = r;
UG_FillFrame(x1 + r, y1, x2 - r, y2, c);
while ( x <= y )
{
if( y > 0 )
{
UG_DrawLine(x2 + x - r, y1 - y + r, x2+ x - r, y + y2 - r, c);
UG_DrawLine(x1 - x + r, y1 - y + r, x1- x + r, y + y2 - r, c);
}
if( x > 0 )
{
UG_DrawLine(x1 - y + r, y1 - x + r, x1 - y + r, x + y2 - r, c);
UG_DrawLine(x2 + y - r, y1 - x + r, x2 + y - r, x + y2 - r, c);
}
if ( xd < 0 )
{
xd += (x << 2) + 6;
}
else
{
xd += ((x - y) << 2) + 10;
y--;
}
x++;
}
UG_DrawRoundFrame(x1, y1, x2, y2, r, c );
}
from st7789-stm32-ugui.
This one works too but I don't know if it's faster or not
from st7789-stm32-ugui.
It should perform pretty much the same.
Please note I'm not the author of uGUI neither I'm developing this fork anymore.
My main contribution was adding a new font structure and UTF-8 support.
If this works for you consider making a pull request.
Thanks!
from st7789-stm32-ugui.
Yeah, this works for me but I have no idea how to create a pull request with this patch since I've never used this feature before
from st7789-stm32-ugui.
Related Issues (8)
- Pin namings HOT 4
- Unreliable SPI write. HOT 3
- ST7789_demo_f407ve failed compilation HOT 1
- Display Fill doesn't work correctly on different display sizes HOT 2
- 建议添加显示中文 HOT 1
- 添加中文问题 HOT 1
- Blank Screen on the F411CE demo HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from st7789-stm32-ugui.