Background

Background ( fillColor ;​ fillColorVariant ;​ borderStroke ;​ borderColor ;​ borderColorVariant ;​ shadowEffect ;​ shadowColor )

Argument Type Range Default Note
fillColor rgba 0..255 white
fillColorVariant int -1..128 solid
borderStroke num[] 0..1000 1 Dimension:[pt]
borderColor rgba 0..255 black
borderColorVariant int -1..128 solid
shadowEffect num[] -1000..1000 0
shadowColor rgba 0..255 #888a
Examples
Description

The Background() function makes it possible to define a single-color or gradient background including border and shadow. If the Background() function is entered without arguments, a white background with a 1-pixel wide black border without shadow is drawn.

BACKGROUND_01
1

OpenDrawing(250;​150)

2

ChartData(7 5 4 2 1)

3

BarChart()

4

/* Set up styles. */

5

FillStyle(1;​#4682b4)

6

BorderStyle(all;​none)

7

/* Set up axes. */

8

AxisLine(all;​0)

9

AxisMajorTicks(all;​0)

10

/* Set up grid and background. */

11

MajorGridLineWidths(y;​x;​0)

12

MajorGridLineWidths(x;​y;​0.25)

13

Background()

14

CloseDrawing()

BACKGROUND_01

If no views are used or if the background function is entered outside of the views, then the function is applied to the entire drawing. Views are explained in Script Structure.

BACKGROUND_02
1

OpenDrawing(250;​150)

2

ChartData(7 5 4 2 1)

3

BarChart()

4

/* Set up styles. */

5

FillStyle(1;​#4682b4)

6

BorderStyle(all;​none)

7

/* Set up axes. */

8

AxisLine(all;​0)

9

AxisMajorTicks(all;​0)

10

/* Set up grid and background. */

11

MajorGridLineWidths(y;​x;​0)

12

MajorGridLineColors(x;​y;​#e1d9c9)

13

Background(#f7f6f1;​solid;​0)

14

CloseDrawing()

BACKGROUND_02
BACKGROUND_03
1

OpenDrawing(250;​150)

2

OpenView(40;​20;​170;​110)

3

ChartData(7 5 4 2 1)

4

BarChart()

5

/* Set up styles. */

6

FillStyle(1;​#4682b4)

7

BorderStyle(all;​none)

8

/* Set up axes. */

9

AxisLine(all;​0)

10

AxisMajorTicks(all;​0)

11

/* Set up grid and background. */

12

MajorGridLineWidths(y;​x;​0)

13

MajorGridLineColors(x;​y;​#e1d9c9)

14

CloseView()

15

Background(#f7f6f1;​solid;​0)

16

CloseDrawing()

BACKGROUND_03
BACKGROUND_04
1

OpenDrawing(250;​150)

2

OpenView(40;​20;​170;​110)

3

ChartData(7 5 4 2 1)

4

BarChart()

5

/* Set up styles. */

6

FillStyle(1;​#4682b4)

7

BorderStyle(all;​none)

8

/* Set up axes. */

9

AxisLine(all;​0)

10

AxisMajorTicks(all;​0)

11

/* Set up grid and background. */

12

MajorGridLineWidths(y;​x;​0)

13

MajorGridLineColors(x;​y;​#e1d9c9)

14

CloseView()

15

Background(#f7f6f1;​solid;​0;​none;​solid;​2 2 4)

16

CloseDrawing()

BACKGROUND_04
BACKGROUND_05
1

OpenDrawing(250;​150)

2

OpenView(40;​20;​170;​110)

3

ChartData(7 5 4 2 1)

4

BarChart()

5

/* Set up styles. */

6

FillStyle(1;​#4682b4)

7

BorderStyle(all;​none)

8

/* Set up axes. */

9

AxisLine(all;​0)

10

AxisMajorTicks(all;​0)

11

/* Set up grid and background. */

12

MajorGridLineWidths(y;​x;​0)

13

MajorGridLineColors(x;​y;​#e1d9c9)

14

CloseView()

15

Background(#f7f6f1;​solid;​0.5;​#a58b5c;​solid;​0 1 5)

16

CloseDrawing()

BACKGROUND_05

If the Background() function is entered within a view, then the function is applied to the background of the view.

BACKGROUND_06
1

OpenDrawing(250;​150)

2

OpenView(80;​40;​150;​90)

3

ChartData(7 5 4 2 1)

4

BarChart()

5

/* Set up styles. */

6

FillStyle(1;​#4682b4)

7

BorderStyle(all;​none)

8

/* Set up axes. */

9

AxisLine(all;​0)

10

AxisMajorTicks(all;​0)

11

/* Set up grid and background. */

12

MajorGridLineWidths(y;​x;​0)

13

MajorGridLineColors(x;​y;​#e1d9c9)

14

Background(#f7f6f1;​solid;​0.5;​#a58b5c;​solid;​0 1 5)

15

CloseView()

16

Background(white;​solid;​0.5;​#a58b5c)

17

CloseDrawing()

BACKGROUND_06
BACKGROUND_07
1

OpenDrawing(250;​150)

2

OpenView(80;​40;​150;​90)

3

ChartData(7 5 4 2 1)

4

BarChart()

5

/* Set up styles. */

6

FillStyle(1;​#4682b4)

7

BorderStyle(all;​none)

8

/* Set up axes. */

9

AxisLine(all;​0)

10

AxisMajorTicks(all;​0)

11

/* Set up grid and background. */

12

MajorGridLineWidths(y;​x;​0)

13

MajorGridLineColors(x;​y;​#e1d9c9)

14

Background(#fdfcf7;​solid;​1;​#e9ddc7)

15

CloseView()

16

Background(#f7f6f1;​solid;​3.5;​#e1d2b6)

17

CloseDrawing()

BACKGROUND_07
Scroll to Top