Hello guys, I'm trying to draw rounded rectangle on my script, but the question is, is there a way to modify the curvature of the corners? I mean, there's default curvature, but I would change it. Long time ago, there was a function which has an argument to modify this.
This is the code I'm using:
function roundedRectangle(x, y, w, h, borderColor, bgColor, postGUI)
if (x and y and w and h) then
if (not borderColor) then
borderColor = tocolor(0, 0, 0, 200);
end
if (not bgColor) then
bgColor = borderColor;
end
dxDrawRectangle(x, y, w, h, bgColor, postGUI);
dxDrawRectangle(x + 2, y - 1, w - 4, 1, borderColor, postGUI);
dxDrawRectangle(x + 2, y + h, w - 4, 1, borderColor, postGUI);
dxDrawRectangle(x - 1, y + 2, 1, h - 4, borderColor, postGUI);
dxDrawRectangle(x + w, y + 2, 1, h - 4, borderColor, postGUI);
end
end