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:
paintargs.graphics()->drawRoundedRectangle(getBoundingRectangle(),AguiSize(25,25),
AguiColor(255,0,0),2);
so basically, thickness of 2, radius of 25.
I attached a picture of the problem.
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"}
Are you using al_draw_rounded_rectangle?
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
I can't reproduce it here... are you sure your thickness is exactly 2?
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
Are you using Direct3D by any chance? What happens if you set it to use OpenGL?
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,
Thanks
Almost gave me a heart attack
Glad it's solved.