|
Arcs of round rectangle are not a consistant thickness |
jmasterx
Member #11,410
October 2009
|
Hello, I want to use round rectangles for my Gui, but the radii arcs are way thicker than they should be, how can I get a nice consistent look?Its not aliasing, that just would look jagged. My code uses this: so basically, thickness of 2, radius of 25. Thanks {"name":"602777","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/7\/87b6f8881a8228274ec709ee49f505e7.png","w":457,"h":188,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/7\/87b6f8881a8228274ec709ee49f505e7"} Agui GUI API -> https://github.com/jmasterx/Agui |
SiegeLord
Member #7,827
October 2006
|
Are you using al_draw_rounded_rectangle? "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
jmasterx
Member #11,410
October 2009
|
Yes: void AguiAllegro5GraphicsManager::drawRoundedRectangle( const AguiRectangle &rect, const AguiSize &roundRadii, const AguiColor &color, const float &thickness /*= 1.0f*/ ) { al_draw_rounded_rectangle(rect.getLeft(),rect.getTop(), rect.getRight(),rect.getBottom(), roundRadii.getWidth(),roundRadii.getHeight(), getColor(color),thickness); } It gets worse as I increase thickness so its clearly not a sub pixel issue It looks correct when I draw hairline (thickness <= 0) but I need thicker Agui GUI API -> https://github.com/jmasterx/Agui |
SiegeLord
Member #7,827
October 2006
|
I can't reproduce it here... are you sure your thickness is exactly 2? "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
jmasterx
Member #11,410
October 2009
|
Could it be because I'm not using 5.0RC2, i'm using 4.9.22, I tried 2, 2.0f, 3, 3.0f, 3.5f, same issues Agui GUI API -> https://github.com/jmasterx/Agui |
SiegeLord
Member #7,827
October 2006
|
Are you using Direct3D by any chance? What happens if you set it to use OpenGL? "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
jmasterx
Member #11,410
October 2009
|
Tried default (D3D) , GL, GL_3_0, but still all looks the same hmm.. doing this in the main loop looks fine: al_draw_rounded_rectangle(0,0,200,200,25,25,al_map_rgba_f(0.5,0,0,1.0f),3); Ill check my clipping rects Ok that was it problem solved, Agui GUI API -> https://github.com/jmasterx/Agui |
SiegeLord
Member #7,827
October 2006
|
Almost gave me a heart attack "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
|