AddRoundRect

Modified in version 4.0

AddRoundRect ( left ;​ top ;​ width ;​ height ;​ xRadius ;​ yRadius ;​ fillColor ;​ fillColorVariant ;​ borderStroke ;​ borderColor ;​ borderColorVariant ;​ shadowEffect ;​ shadowColor )

Argument Type Range Default Note
left num -inf..+inf (required)
top num -inf..+inf (required)
width num 0..inf (required)
height num 0..inf (required)
xRadius num 0..1000 12 Dimension:[pt]
yRadius num 0..1000 12 Dimension:[pt]
fillColor rgba 0..255 black
fillColorVariant int -1..128 solid
borderStroke num[] 0..1000 0 Dimension:[pt]
borderColor rgba 0..255 none
borderColorVariant int -1..128 solid
shadowEffect num[] -1000..1000 0
shadowColor rgba 0..255 #888a
Examples

AddRoundRect(50;​50;​250;​150;​;​;​2;​red)

AddRoundRect(50;​50;​250;​150;​16;​16;​lightGray)

Description

The AddRoundRect() function makes it possible to draw rectangles with rounded corners whose fill, border and shadow can be varied. The rounding is controlled by using the arguments xRadius and yRadius. The greater xRadius and yRadius, the greater the rounding of the corner. When xRadius =​ 0 and yRadius =​ 0, the rounding disappears and AddRoundRect() changes to AddRect() .

ADD_ROUND_RECT_01
1

OpenDrawing(100;​100)

2

AddRoundRect(10;​10;​80;​80;​30;​30;​steelBlue)

3

CloseDrawing()

ADD_ROUND_RECT_01
ADD_ROUND_RECT_02
1

OpenDrawing(100;​100)

2

AddRoundRect(10;​10;​80;​80;​30;​30;​215 101 90;​shaded;​;​;​;​0 0 5)

3

CloseDrawing()

ADD_ROUND_RECT_02
ADD_ROUND_RECT_03
1

OpenDrawing(100;​100)

2

AddRoundRect(10;​10;​80;​80;​30;​30;​darkYellow;​shaded;​10;​110 110 110;​shaded)

3

CloseDrawing()

ADD_ROUND_RECT_03
Scroll to Top
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×