AddSlice

Modified in version 4.0

AddSlice ( left ;​ top ;​ width ;​ height ;​ startAngle ;​ arcAngle ;​ innerRadius ;​ 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)
startAngle num -360..+360 0 Dimension:[deg]
arcAngle num -360..+360 90 Dimension:[deg]
innerRadius num 0..100 0 In % of slice radius
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

AddSlice(50;​50;​250;​150;​-45;​90)

AddSlice(50;​50;​250;​150;​45;​90;​20;​red)

Description

The AddSlice() function is used to draw oval slices whose fill, border and shadow can be varied. The arguments startAngle and arcAngle are explained in combination with the AddArc() function. The argument innerRadius makes it possible to draw ring-shaped sectors. The inner radius is to be entered in percentage of the half axis — between 0 (default) and 100.

ADD_SLICE_01
1

OpenDrawing(100;​100)

2

AddSlice(10;​10;​80;​80;​

3

90;​ /* Start angle */

4

240;​ /* Arc angle */

5

0;​ /* Inner radius */

6

steelBlue;​shaded) /* Fill */

7

CloseDrawing()

ADD_SLICE_01
ADD_SLICE_02
1

OpenDrawing(100;​100)

2

AddSlice(10;​10;​80;​80;​

3

90;​ /* Start angle */

4

240;​ /* Arc angle */

5

50;​ /* Inner radius */

6

steelBlue;​solid) /* Fill */

7

CloseDrawing()

ADD_SLICE_02
ADD_SLICE_03
1

OpenDrawing(100;​100)

2

AddSlice(10;​10;​80;​80;​

3

90;​ /* Start angle */

4

240;​ /* Arc angle */

5

0;​ /* Inner radius */

6

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

7

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

8

CloseDrawing()

ADD_SLICE_03
ADD_SLICE_04
1

OpenDrawing(100;​100)

2

AddSlice(10;​10;​80;​80;​

3

90;​ /* Start angle */

4

240;​ /* Arc angle */

5

0;​ /* Inner radius */

6

lightBlue;​shaded;​ /* Fill */

7

5.5;​paleVioletRed;​shaded;​ /* Border */

8

3 3 5) /* Shadow */

9

CloseDrawing()

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

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

×