rabryan Posted November 12, 2013 Report Share Posted November 12, 2013 I'm developing some code running on an Embest-STM32-DMSTF4BB board with SSD2119 LCD that draws a lot of rounded rectangles. I had been working off the master branch from a commit in early October. I just recently updated to the latest commit on master (bca78196) and the drawing of the rounded edges of the rectangles has degraded somewhat. For each edge, the drawing of the arc is not complete -- it skips a pixel just before rejoining the right angled lines of the rectangle. This results in 4 blank pixels in each rounded rectangle. Its not a resolution issue either since the missing pixels are colinear with the straight edges of the rectangle (i.e. they're on the same row or column of the straight edge line).Have there been changes to the gdispDrawRoundedBox() or gdispDrawArc() code that would account for this? Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted November 12, 2013 Report Share Posted November 12, 2013 Hello rabryan,We have indeed changed the algorithm of gdispDrawArc(). I'll forward this to inmarket as he was the one who "invented" the new algorithm. You can copy the gdispDrawArc() routine of the old state which still worked for you and replace it with the new one - that should fix it for now.~ Tectu Link to comment Share on other sites More sharing options...
inmarket Posted November 12, 2013 Report Share Posted November 12, 2013 The old arc routines were significantly broken and have definitely been updated for the new code.Arc's on the old system were VERY problematic and almost never got it right. Filled arc's previously did not even fill the arc area properly leaving a moire type pattern of gaps.It is however quite probable that there are some boundary cases which my testing didn't include. Can you please upload me a short demo program that demonstrates the problem. Replace any variable numbers with absolutes (for example replace things like gfxGetWidth()/2 with an actual number) as the problem could be location and size specific.I will get right on to fixing the problem for you. Link to comment Share on other sites More sharing options...
rabryan Posted November 13, 2013 Author Report Share Posted November 13, 2013 Hi inmarket,Thanks for the quick reply. I put together a quick test program that shows the issue. It can be found here:https://bitbucket.org/rabryan/ugfx-test-arcsIt just draws to non-filled rounded rectangles on a black background. Each rectangle has a missing pixel at the end of each corner arc going clockwise. Link to comment Share on other sites More sharing options...
inmarket Posted November 13, 2013 Report Share Posted November 13, 2013 Thanks, that test was perfect.The problem has been fixed in the current master repository. Link to comment Share on other sites More sharing options...
rabryan Posted November 14, 2013 Author Report Share Posted November 14, 2013 Excellent. That definitely fixed it. Thanks for your help! Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted November 14, 2013 Report Share Posted November 14, 2013 Thanks for fixing, inmarket.@rabryan: Could you share any videos or pictures of your work? It would be nice to fill up our demos section a bit.~ Tectu Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now