AddMultigon

New in version 5.0

AddMultigon ( left ;​ top ;​ width ;​ height ;​ numOfVertices ;​ rotation ;​ innerRadiiRel ;​ innerCornerRadiusRel ;​ capParams ;​ spokeThickness ;​ 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)
numOfVertices int 3..100 (required)
rotation num -360..+360 0 Dimension:[deg]
innerRadiiRel num[] -1..1 0.5
innerCornerRadiusRel num 0..1 0
capParams num[] 0..3 0
spokeThickness num 0..1000 0
fillColor rgba 0..255 black
fillColorVariant int -1..128 solid
borderStroke num[] 0..1000 0 Dimension:[pt]
borderColor rgba 0..255 black
borderColorVariant int -1..128 solid
shadowEffect num[] -1000..1000 0
shadowColor rgba 0..255 #888a
Examples

AddMultigon(50;​50;​250;​250;​5) /* Polygon. */

AddMultigon(50;​50;​250;​250;​5;​0;​0.4) /* Star.  */

AddMultigon(50;​50;​250;​250;​5;​0;​0;​0;​0;​10) /* Spokes.  */

Description

The AddMultigon() function makes it possible to depict regular polygons in a variety of ways. The number of polygon points (vertices) can be controlled by using the argument numOfVertices, the rotation of the polygon by the argument rotation. A rotation angle greater than zero moves the polygon clockwise; by entering a negative rotation angle the polygon is moved counter-clockwise. The rotation angle is to be entered within the range of ±360 degrees. The argument innerRadiiRel can have up to 2 values, i.e. the radial indent of the inner vertices, and an optional circular offset. Both values have to be entered relative to the outer radius, the radial indent between 0 and 1 (default is 0.5) and the circular offset between -1 and +1 (default is 0). The corner roundings of the inner vertices can be controlled by the argument innerCornerRadiusRel with a value between 0 and 1. The shape of the outer vertex is controlled by using the argument capParams. Three cap types are supported. As an option, a second parameter can be added to fine tune the appearance of the caps.
0...No cap (default).
1...Cut-off. The size of the cut-off can be controlled by entering a second value between [0..1].
2...Round. The rounding can be controlled by entering a second value between [0..1].
3...Peak. The appearance of the peak can be controlled by entering a second value between [0..1].
Spokes can be defined by using the argument spokeThickness. An optional radial spoke offset can be controlled by the argument innerRadiiRel.

ADD_MULTIGON_01
1

OpenDrawing(120;​120)

2

AddMultigon(10;​15;​100;​100;​

3

3;​ /* Number of vertices. [3..100]  */

4

0;​ /* Rotation [-360..360]  */

5

1.0;​ /* Inner radius rel. [0..1]  */

6

0;​ /* Inner corner radius rel. [0..1]  */

7

2 0.25;​ /* Cap param[1]: Cap type: 2...Round  */

8

/* Cap param[2]: Vertex corner radius */

9

0;​ /* Spoke thickness (ignored).  */

10

darkYellow;​solid;​ /* Fill.  */

11

6.0;​110 110 110;​solid;​ /* Border.  */

12

0 0 5) /* Shadow.  */

13

CloseDrawing()

ADD_MULTIGON_01
ADD_MULTIGON_02
1

OpenDrawing(120;​120)

2

AddMultigon(10;​10;​100;​100;​

3

4;​ /* Number of vertices. [3..100]  */

4

0;​ /* Rotation [-360..360]  */

5

1.0;​ /* Inner radius rel. [0..1]  */

6

0;​ /* Inner corner radius rel. [0..1] */

7

0;​ /* Cap params (ignored).  */

8

0;​ /* Spoke thickness (ignored).  */

9

darkYellow;​solid;​ /* Fill.  */

10

6.0;​110 110 110;​solid;​ /* Border.  */

11

0 0 5) /* Shadow.  */

12

CloseDrawing()

ADD_MULTIGON_02
ADD_MULTIGON_03
1

OpenDrawing(120;​120)

2

AddMultigon(10;​10;​100;​100;​

3

7;​ /* Number of vertices. [3..100]  */

4

25.7;​ /* Rotation [-360..360]  */

5

1.0;​ /* Inner radius rel. [0..1]  */

6

0;​ /* Inner corner radius rel. [0..1] */

7

0;​ /* Cap params (ignored).  */

8

0;​ /* Spoke thickness (ignored).  */

9

teal;​shaded;​ /* Fill.  */

10

0;​;​;​ /* Border.  */

11

0 0 8;​green) /* Shadow.  */

12

CloseDrawing()

ADD_MULTIGON_03
ADD_MULTIGON_04
1

OpenDrawing(120;​120)

2

AddMultigon(10;​12;​100;​100;​

3

5;​ /* Number of vertices. [3..100]  */

4

0;​ /* Rotation [-360..360]  */

5

1.0;​ /* Inner radius rel. [0..1]  */

6

0;​ /* Inner corner radius rel. [0..1]  */

7

2 0.25;​ /* Cap param[1]: Cap type: 2...round.  */

8

/* Cap param[2]: Vertex corner radius. */

9

0;​ /* Spoke thickness (ignored).  */

10

none;​;​ /* Fill.  */

11

4;​teal;​;​ /* Border.  */

12

0 0 6;​green) /* Shadow.  */

13

CloseDrawing()

ADD_MULTIGON_04
ADD_MULTIGON_05
1

OpenDrawing(320;​120)

2

AddMultigon(10;​0;​100;​100;​

3

3;​ /* Number of vertices. [3..100]  */

4

180;​ /* Rotation [-360..360]  */

5

0.5;​ /* Inner radius rel. [0..1]  */

6

0;​ /* Inner corner radius rel. [0..1] */

7

0;​ /* Cap params (ignored).  */

8

0;​ /* Spoke thickness (ignored).  */

9

none;​;​4;​teal)

10

AddMultigon(100;​20;​100;​100;​

11

3;​ /* Number of vertices. [3..100]  */

12

0;​ /* Rotation [-360..360]  */

13

0.5;​ /* Inner radius rel. [0..1]  */

14

0.5;​ /* Inner corner radius rel. [0..1]  */

15

2 0.2;​ /* Cap param[1]: Cap type: 2...round.  */

16

/* Cap param[2]: Vertex corner radius. */

17

0;​ /* Spoke thickness (ignored).  */

18

none;​;​4;​teal)

19

AddMultigon(210;​10;​100;​100;​

20

4;​ /* Number of vertices. [3..100]  */

21

45;​ /* Rotation [-360..360]  */

22

0.5;​ /* Inner radius rel. [0..1]  */

23

1.0;​ /* Inner corner radius rel. [0..1] */

24

0;​ /* Cap params (ignored).  */

25

0;​ /* Spoke thickness (ignored).  */

26

none;​;​4;​teal)

27

CloseDrawing()

ADD_MULTIGON_05
ADD_MULTIGON_06
1

OpenDrawing(120;​120)

2

AddMultigon(10;​10;​100;​100;​

3

15;​ /* Number of vertices. [3..100]  */

4

215;​ /* Rotation [-360..360]  */

5

0.75;​ /* Inner radius rel. [0..1]  */

6

1.0;​ /* Inner corner radius rel. [0..1]  */

7

2 1.0;​ /* Cap param[1]: Cap type: 2...round.  */

8

/* Cap param[2]: Vertex corner radius. */

9

0;​ /* Spoke thickness (ignored).  */

10

steelBlue;​shaded;​ /* Fill.  */

11

0;​;​;​ /* Border.  */

12

2 2 5) /* Shadow.  */

13

CloseDrawing()

ADD_MULTIGON_06
ADD_MULTIGON_07
1

OpenDrawing(240;​120)

2

AddMultigon(10;​10;​100;​100;​

3

17;​ /* Number of vertices. [3..100]  */

4

0;​ /* Rotation [-360..360]  */

5

0.85;​ /* Inner radius rel. [0..1]  */

6

1.0;​ /* Inner corner radius rel. [0..1] */

7

0;​ /* Cap params (ignored).  */

8

0;​ /* Spoke thickness (ignored).  */

9

darkYellow;​solid;​ /* Fill.  */

10

2.5;​#888;​solid;​ /* Border.  */

11

0 0 5) /* Shadow.  */

12

AddMultigon(130;​10;​100;​100;​

13

17;​ /* Number of vertices. [3..100]  */

14

0;​ /* Rotation [-360..360]  */

15

0.75;​ /* Inner radius rel. [0..1]  */

16

0.5;​ /* Inner corner radius rel. [0..1] */

17

1 0.8;​ /* Cap params (ignored).  */

18

0;​ /* Spoke thickness (ignored).  */

19

darkYellow;​solid;​ /* Fill.  */

20

2.5;​#888;​solid;​ /* Border.  */

21

0 0 5) /* Shadow.  */

22

CloseDrawing()

ADD_MULTIGON_07
ADD_MULTIGON_08
1

OpenDrawing(120;​120)

2

AddMultigon(10;​10;​100;​100;​

3

17;​ /* Number of vertices. [3..100]  */

4

0;​ /* Rotation [-360..360]  */

5

0.25;​ /* Inner radius rel. [0..1]  */

6

0;​ /* Inner corner radius rel. [0..1] */

7

0;​ /* Cap params (ignored).  */

8

0;​ /* Spoke thickness (ignored).  */

9

darkYellow;​solid;​ /* Fill.  */

10

0.5;​red;​solid;​ /* Border.  */

11

0 0 5) /* Shadow.  */

12

CloseDrawing()

ADD_MULTIGON_08
ADD_MULTIGON_09
1

OpenDrawing(240;​120)

2

AddMultigon(10;​10;​100;​100;​

3

15;​ /* Number of vertices. [3..100]  */

4

0;​ /* Rotation [-360..360]  */

5

0.7 1.0;​ /* [1]: Inner radius rel. [0..1]  */

6

/* [2]: Inner point offset. [-1..1]  */

7

1;​ /* Inner corner radius rel. [0..1]  */

8

2 1.0;​ /* Cap param[1]: Cap type: 2...round.  */

9

/* Cap param[2]: Vertex corner radius. */

10

0;​ /* Spoke thickness (ignored).  */

11

steelBlue;​shaded;​ /* Fill.  */

12

0;​;​;​ /* Border.  */

13

2 2 5) /* Shadow.  */

14

AddMultigon(130;​10;​100;​100;​

15

15;​ /* Number of vertices. [3..100]  */

16

0;​ /* Rotation [-360..360]  */

17

0.5 -1.0;​ /* [1]: Inner radius rel. [0..1]  */

18

/* [2]: Inner point offset. [-1..1]  */

19

1.0;​ /* Inner corner radius rel. [0..1]  */

20

0;​ /* Cap params (ignored).  */

21

0;​ /* Spoke thickness (ignored).  */

22

darkYellow;​shaded;​ /* Fill.  */

23

0;​;​;​ /* Border.  */

24

2 2 5) /* Shadow.  */

25

CloseDrawing()

ADD_MULTIGON_09
ADD_MULTIGON_10
1

OpenDrawing(120;​120)

2

AddMultigon(10;​10;​100;​100;​

3

4;​ /* Number of vertices. [3..100]  */

4

0;​ /* Rotation [-360..360]  */

5

0.75 0.5;​ /* [1]: Inner radius rel. [0..1]  */

6

/* [2]: Inner point offset. [-1..1]  */

7

0;​ /* Inner corner radius rel. [0..1]  */

8

2 1.0;​ /* Cap param[1]: Cap type: 2...round.  */

9

/* Cap param[2]: Vertex corner radius. */

10

0;​ /* Spoke thickness (ignored).  */

11

darkYellow;​solid;​ /* Fill.  */

12

3.0;​110 110 110;​solid;​ /* Border.  */

13

0 0 5) /* Shadow.  */

14

CloseDrawing()

ADD_MULTIGON_10
ADD_MULTIGON_11
1

OpenDrawing(120;​120)

2

AddMultigon(10;​18;​100;​100;​

3

3;​ /* Number of vertices. [3..100]  */

4

0;​ /* Rotation [-360..360]  */

5

0;​ /* Inner radius rel. [0..1]  */

6

0.25;​ /* Inner corner radius rel. [0..1]  */

7

3 0.5;​ /* Cap param[1]: Cap type: 3...peak.  */

8

/* Cap param[2]: Vertex corner radius. */

9

12;​ /* Spoke thickness.  */

10

steelBlue;​solid;​ /* Fill.  */

11

0;​;​;​ /* Border.  */

12

2 2 5) /* Shadow.  */

13

CloseDrawing()

ADD_MULTIGON_11
ADD_MULTIGON_12
1

OpenDrawing(120;​120)

2

AddMultigon(10;​12;​100;​100;​

3

5;​ /* Number of vertices. [3..100]  */

4

215;​ /* Rotation [-360..360]  */

5

0;​ /* Inner radius rel. [0..1]  */

6

0;​ /* Inner corner radius rel. [0..1]  */

7

2 1.0;​ /* Cap param[1]: Cap type: 2...round.  */

8

/* Cap param[2]: Vertex corner radius. */

9

12;​ /* Spoke thickness.  */

10

steelBlue;​solid;​ /* Fill.  */

11

0;​;​;​ /* Border.  */

12

2 2 5) /* Shadow.  */

13

CloseDrawing()

ADD_MULTIGON_12
ADD_MULTIGON_13
1

OpenDrawing(120;​120)

2

AddMultigon(10;​10;​100;​100;​

3

4;​ /* Number of vertices. [3..100]  */

4

45;​ /* Rotation [-360..360]  */

5

0;​ /* Inner radius rel. [0..1]  */

6

0;​ /* Inner corner radius rel. [0..1]  */

7

2 1.0;​ /* Cap param[1]: Cap type: 2...round.  */

8

/* Cap param[2]: Vertex corner radius. */

9

15;​ /* Spoke thickness.  */

10

darkRed;​solid;​ /* Fill.  */

11

0;​;​;​ /* Border.  */

12

0 0 6) /* Shadow.  */

13

CloseDrawing()

ADD_MULTIGON_13
ADD_MULTIGON_14
1

OpenDrawing(120;​120)

2

AddMultigon(10;​15;​100;​100;​

3

30;​ /* Number of vertices. [3..100]  */

4

0;​ /* Rotation [-360..360]  */

5

0.25;​ /* Inner radius rel. [0..1]  */

6

0;​ /* Inner corner radius rel. [0..1]  */

7

2 1.0;​ /* Cap param[1]: Cap type: 2...round.  */

8

/* Cap param[2]: Vertex corner radius. */

9

10;​ /* Spoke thickness.  */

10

darkYellow;​solid;​ /* Fill.  */

11

1.0;​200 100 0;​solid;​ /* Border.  */

12

​0 0 5) /* Shadow.  */

13

CloseDrawing()

ADD_MULTIGON_14
ADD_MULTIGON_15
1

OpenDrawing(120;​120)

2

AddMultigon(10;​15;​100;​100;​

3

3;​ /* Number of vertices. [3..100]  */

4

0;​ /* Rotation [-360..360]  */

5

0;​ /* Inner radius rel. [0..1]  */

6

0;​ /* Inner corner radius rel. [0..1]  */

7

2 1.0;​ /* Cap param[1]: Cap type: 2...round.  */

8

/* Cap param[2]: Vertex corner radius. */

9

100;​ /* Spoke thickness.  */

10

darkYellow;​solid;​ /* Fill.  */

11

6.0;​110 110 110;​solid;​ /* Border.  */

12

0 0 5) /* Shadow.  */

13

CloseDrawing()

ADD_MULTIGON_15
ADD_MULTIGON_16
1

OpenDrawing(120;​120)

2

AddMultigon(10;​15;​100;​100;​

3

38;​ /* Number of vertices. [3..100]  */

4

0;​ /* Rotation [-360..360]  */

5

0.92;​ /* Inner radius rel. [0..1]  */

6

0;​ /* Inner corner radius rel. [0..1]  */

7

2 1.0;​ /* Cap param[1]: Cap type: 2...round.  */

8

/* Cap param[2]: Vertex corner radius. */

9

100;​ /* Spoke thickness.  */

10

darkYellow;​solid;​ /* Fill.  */

11

1.0;​110 110 110;​solid;​ /* Border.  */

12

0 0 5) /* Shadow.  */

13

CloseDrawing()

ADD_MULTIGON_16
ADD_MULTIGON_17
1

OpenDrawing(120;​120)

2

AddMultigon(10;​10;​100;​100;​

3

11;​ /* Number of vertices. [3..100]  */

4

0;​ /* Rotation [-360..360]  */

5

0.4;​ /* Inner radius rel. [0..1]  */

6

0;​ /* Inner corner radius rel. [0..1]  */

7

2 1.0;​ /* Cap param[1]: Cap type: 2...round.  */

8

/* Cap param[2]: Vertex corner radius. */

9

9;​ /* Spoke thickness.  */

10

steelBlue;​solid) /* Fill.  */

11

CloseDrawing()

ADD_MULTIGON_17
ADD_MULTIGON_18
1

OpenDrawing(120;​120)

2

AddMultigon(10;​10;​100;​100;​

3

13;​ /* Number of vertices. [3..100]  */

4

0;​ /* Rotation [-360..360]  */

5

0.45;​ /* Inner radius rel. [0..1]  */

6

0;​ /* Inner corner radius rel. [0..1]  */

7

2 1.0;​ /* Cap param[1]: Cap type: 2...round.  */

8

/* Cap param[2]: Vertex corner radius.  */

9

8;​ /* Spoke thickness.  */

10

2 0.5 0.5 0.0 255 0 0 255 0.5 255 255 0 255 1.0 0 0 255 255;​;​ /* Fill. */

11

0;​none;​;​ /* Border.  */

12

0 0 8;​green) /* Shadow.  */

13

CloseDrawing()

ADD_MULTIGON_18
Scroll to Top