Bitmap Patterns

Presently there are 128 built-in bitmap patterns to choose from which can be accessed by entering a pattern ID between 1 and 128. The pattern ID is entered by using the argument colorVariant — part of numerous xmCHART functions. For example:

AddRect(10;​10;​200;​120;​;​56) /* Black&white pattern ID: 56 */

AddRect(10;​10;​200;​120;​;​123) /* Color pattern ID: 123 */

Black & White Patterns

The 64 black & white patterns can be referenced by a pattern ID between 1 and 64. Several frequently used patterns can also be accessed by name. For example:

AddRect(10;​10;​200;​120;​;​8)

AddRect(10;​10;​200;​120;​;​lightGray) /* Same as line above. */

The color and transparency of the pattern can be controlled by the argument color. For example:

AddRect(10;​10;​200;​120;​red;​9) /* Red dots on a white background. */

AddRect(10;​10;​200;​120;​255 0 0 100;​9) /* Red dots on a translucent background. */

By using pattern ID 1 or constant transparent the fill can be suppressed. For example:

FillStyle(1;​;​transparent) /* Same as FillStyle(1;none) */

FillStyle(1;​;​1) /* Same as line above. */

Black & White Pattern Palette
Black & White Patterns
BW_PATTERN_PALETTE
Examples
EXAMPLE_01
1

OpenDrawing(200;​110)

2

AddRect(10;​10;​100;​60;​indianRed;​gray)

3

AddRoundRect(70;​30;​70;​70;​

4

12;​12;​ /* Rounding: xRadius;yRadius */

5

lightSteelBlue;​21;​ /* Fill: color;patternID */

6

5;​steelBlue;​0;​ /* Border: width;color;colorVariant */

7

2 2 4) /* Shadow: xOffset yOffset blurRadius */

8

CloseDrawing()

EXAMPLE_01
EXAMPLE_02
1

OpenDrawing(200;​120)

2

AddRect(10;​10;​100;​60;​indianRed)

3

AddOval(70;​30;​80;​80;​

4

#4682b477;​21;​ /* Translucent fill: colorWithAlphaValue;patternID */

5

5;​steelBlue;​0;​ /* Border: width;color;colorVariant */

6

2 2 4) /* Shadow: xOffset yOffset blurRadius */

7

CloseDrawing()

EXAMPLE_02
EXAMPLE_03
1

OpenDrawing(200;​200)

2

ChartData(4 7 11 19 33 50)

3

PieChart(label)

4

BorderStyle(all;​;​0.5;​100 100 100)

5

FillStyle(1;​black;​19)

6

FillStyle(2;​black;​27)

7

FillStyle(3;​black;​gray)

8

FillStyle(4;​black;​9)

9

FillStyle(5;​teal;​14)

10

FillStyle(6;​darkRed;​lightGray)

11

CloseDrawing()

EXAMPLE_03

Color Patterns

The 64 color patterns can be referenced by a pattern ID between 65 and 128. For example:

AddRect(10;​10;​200;​120;​;​65)

AddRect(10;​10;​200;​120;​;​123)

The transparency of the pattern can be controlled by the alpha value of the argument color. The three RGB components in color are ignored. For example:

AddRect(10;​10;​200;​120;​0 0 0 100;​120)

Color Pattern Palette
Color Patterns
COLOR_PATTERN_PALETTE
Examples
EXAMPLE_04
1

OpenDrawing(200;​110)

2

AddRect(10;​10;​100;​60;​;​120)

3

AddRoundRect(70;​30;​70;​70;​

4

12;​12;​ /* Rounding: xRadius;yRadius */

5

;​69;​ /* Fill: [color];patternID */

6

5;​;​125;​ /* Border: width;[color];patternID */

7

2 2 4) /* Shadow: xOffset yOffset blurRadius */

8

CloseDrawing()

EXAMPLE_04
EXAMPLE_05
1

OpenDrawing(200;​120)

2

AddRect(10;​10;​100;​60;​indianRed)

3

AddOval(70;​30;​80;​80;​

4

0 0 0 80;​88;​ /* Translucent fill: alphaValue;patternID */

5

5;​;​125;​ /* Border: width;[color];patternID */

6

2 2 4) /* Shadow: xOffset yOffset blurRadius */

7

CloseDrawing()

EXAMPLE_05
EXAMPLE_06
1

OpenDrawing(150;​150)

2

ChartData(9;​ 16;​ 29;​ 47)

3

BarChart(label;​;​35)

4

BorderStyle(all;​;​1;​0 0 0 50)

5

FillStyle(1;​;​124)

6

FillStyle(2;​;​123)

7

FillStyle(3;​;​125)

8

FillStyle(4;​0 0 0 200;​126)

9

AxisOptions(all;​none) /* Hide axes. */

10

GridLocation(all;​none) /* Hide grid. */

11

ChartBackground(xy;​0 0 0 80;​120;​1;​0 0 0 20)

12

CloseDrawing()

EXAMPLE_06
Scroll to Top