AddRoundPolygon

New in version 5.0

AddRoundPolygon ( scanDirection ;​ listOfCoords ;​ roundings ;​ fillColor ;​ fillColorVariant ;​ borderStroke ;​ borderColor ;​ borderColorVariant ;​ shadowEffect ;​ shadowColor )

Argument Type Range Default Note
scanDirection int 1..2 xxyy
listOfCoords num[] -inf..+inf (required)
roundings num[] 0..1000 5%
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

AddRoundPolygon(xxyy;​350 50 250 150 250 100 350 250 350 50;​;​red)

AddRoundPolygon(xyxy;​350 50 250 150 250 100 350 250 350 50;​3% 0;​0 90 200)

Description

The AddRoundPolygon() function makes it possible to draw polygonal areas with round corners whose fill, border and shadow can be varied. The arguments scanDirection and listOfCoords are explained in combination with the AddPolygon() function. The corner roundings can be controlled by the third argument roundings.

ADD_ROUND_POLYGON_01
1

OpenDrawing(200;​120)

2

AddRoundPolygon(xyxy;​100 20 60 95 140 95 100 20;​

3

10%;​ /* Corner rounding. */

4

none;​0;​ /* Fill.  */

5

4;​steelBlue;​solid;​ /* Border.   */

6

2 2 2;​ /* Shadow effect.  */

7

lightGray) /* Shadow color.  */

8

CloseDrawing()

ADD_ROUND_POLYGON_01
ADD_ROUND_POLYGON_02
1

OpenDrawing(200;​120)

2

AddRoundPolygon(xyxy;​

3

100.0 20.0

4

109.0 47.6

5

138.0 47.6

6

114.6 64.7

7

123.5 92.4

8

100.0 75.3

9

76.5 92.4

10

85.4 64.7

11

62.0 47.6

12

91.0 47.6

13

100.0 20.0;​

14

5%;​ /* Corner rounding. */

15

206 222 236;​solid;​ /* Fill.   */

16

4;​steelBlue;​solid;​ /* Border.   */

17

2 2 2;​ /* Shadow effect.  */

18

lightGray) /* Shadow color.  */

19

CloseDrawing()

ADD_ROUND_POLYGON_02
ADD_ROUND_POLYGON_03
1

OpenDrawing(200;​120)

2

AddRoundPolygon(xyxy;​100 20 60 95 100 60 140 95 100 20;​

3

10% 20% 0 20%;​ /* Corner roundings. */

4

none;​0;​ /* Fill.   */

5

1;​steelBlue;​solid;​ /* Border.   */

6

2 2 2;​ /* Shadow effect.  */

7

lightGray) /* Shadow color.  */

8

CloseDrawing()

ADD_ROUND_POLYGON_03
ADD_ROUND_POLYGON_04
1

OpenDrawing(200;​120)

2

AddRoundPolygon(xyxy;​

3

15 20

4

45 100

5

75 20

6

105 100

7

135 20

8

165 100

9

185 35;​

10

0 5% 10% 15% 20%;​ /* Corner roundings. */

11

none;​0;​ /* Fill.   */

12

1;​steelBlue;​solid;​ /* Border.   */

13

2 2 2;​ /* Shadow effect.  */

14

lightGray) /* Shadow color.  */

15

CloseDrawing()

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

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

×