Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » please somebody help me with al_draw_rounded_rectangle();

This thread is locked; no one can reply to it. rss feed Print
please somebody help me with al_draw_rounded_rectangle();
Doctor Cop
Member #16,833
April 2018
avatar

I am trying to draw a rounded rectangle in ALLEGRO-5.0.10.

when ever I draw a rounded rectangle the position of y axis is always 200px more, can anybody tell me what is going on?

One more thing, when I set the rx value 400 and ry 300 it just made some weird pattern, dropped in attachments.

Please help!

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

http://liballeg.org/a5docs/trunk/primitives.html#al_draw_rounded_rectangle

The Manual said:

al_draw_rounded_rectangle

void al_draw_rounded_rectangle(float x1, float y1, float x2, float y2,
   float rx, float ry, ALLEGRO_COLOR color, float thickness)

Source Code

Draws an outlined rounded rectangle.

Parameters:

x1, y1, x2, y2 - Upper left and lower right points of the rectangle
color - Color of the rectangle
rx, ry - The radii of the round
thickness - Thickness of the lines, pass <= 0 to draw hairline lines

Go to: