function dxDrawRectangle(x, y, width, height, radius, color, postGUI)
if not x or not y or not width or not height or not radius or not color then
return
end
local radius = math.min(radius, width/2, height/2)
dxDrawRectangle(x + radius, y, width - radius * 2, height, color, postGUI)
dxDrawRectangle(x, y + radius, radius, height - radius * 2, color, postGUI)
dxDrawRectangle(x + width - radius, y + radius, radius, height - radius * 2, color, postGUI)
dxDrawCircle(x + radius, y + radius, radius, 180, 270, color, postGUI)
dxDrawCircle(x + width - radius, y + radius, radius, 270, 360, color, postGUI)
dxDrawCircle(x + radius, y + height - radius, radius, 90, 180, color, postGUI)
dxDrawCircle(x + width - radius, y + height - radius, radius, 0, 90, color, postGUI)
end