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:
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:
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. */
Examples
| | EXAMPLE_01 |
| 1 | OpenDrawing(200;110) |
| 2 | |
| 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 |
| | EXAMPLE_02 |
| 1 | OpenDrawing(200;120) |
| 2 | |
| 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 |
| | EXAMPLE_03 |
| 1 | OpenDrawing(200;200) |
| 2 | ChartData(4 7 11 19 33 50) |
| 3 | |
| 4 | BorderStyle(all;;0.5;100 100 100) |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 |
Color Patterns
The 64 color patterns can be referenced by a pattern ID between 65 and 128. For example:
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)
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 |
| | EXAMPLE_05 |
| 1 | OpenDrawing(200;120) |
| 2 | |
| 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 |
| | EXAMPLE_06 |
| 1 | OpenDrawing(150;150) |
| 2 | ChartData(9; 16; 29; 47) |
| 3 | |
| 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 |