Platforms to show: All Mac Windows Linux Cross-Platform
Back to CDDrawAreaMBS class.
CDDrawAreaMBS.line(x1 as Double, y1 as Double, x2 as Double, y2 as Double, colorValue as color, lineWidth as Integer = 1)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 13.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| Argument | Default | Description |
|---|---|---|
| x1 | (Mandatory) | The x coordinate of the first end-point of the line. |
| y1 | (Mandatory) | The y coordinate of the first end-point of the line. |
| x2 | (Mandatory) | The x coordinate of the second end-point of the line. |
| y2 | (Mandatory) | The y coordinate of the second end-point of the line. |
| c | (Mandatory) | The color of the line. |
| lineWidth | 1 | The line width (thickness). |
See also:
CDDrawAreaMBS.line(x1 as Double, y1 as Double, x2 as Double, y2 as Double, colorValue as Integer, lineWidth as Integer = 1)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| Argument | Default | Description |
|---|---|---|
| x1 | (Mandatory) | The x coordinate of the first end-point of the line. |
| y1 | (Mandatory) | The y coordinate of the first end-point of the line. |
| x2 | (Mandatory) | The x coordinate of the second end-point of the line. |
| y2 | (Mandatory) | The y coordinate of the second end-point of the line. |
| c | (Mandatory) | The color of the line. |
| lineWidth | 1 | The line width (thickness). |
See also:
CDDrawAreaMBS.linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, colors() as color, periodic as boolean=false) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
- linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, colors() as Integer, periodic as boolean=false) as Integer
- linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as color, endColor as color, periodic as boolean=false) as Integer
- linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as Integer, endColor as Integer, periodic as boolean=false) as Integer
CDDrawAreaMBS.linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, colors() as Integer, periodic as boolean=false) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
In this method, the color points are defined as an array of positions and colors along a reference line segment, in the following format:
position0, color0, position1, color1, .... positionN, colorN
The positions are specified as a number from 0 - 256 (0 - 100 in hex), in which 0 represents the starting point of the reference line segment, and 256 (100 in hex) represents the ending point of the reference line segment.
For example, the array (in hex):
000000, FF0000, 000080, FFFF00, 000100, 00FF00
means the starting point (000000) is red (FF0000), the mid-point (000080 in hex) is yellow (FFFF00), and the ending point (000100 in hex) is green (00FF00).
One common usage of multi-point gradient colors is to define colors that have metallic look and feel. ChartDirector comes from several predefined gradient color arrays as follows.
NameValue (in Hex)
| goldGradient | 000000, FFE743, 000060, FFFFE0, 0000B0, FFF0B0, 000100, FFE743 |
| silverGradient | 000000, C8C8C8, 000060, F8F8F8, 0000B0, E0E0E0, 000100, C8C8C8 |
| redMetalGradient | 000000, E09898, 000060, FFF0F0, 0000B0, F0D8D8, 000100, E09898 |
| greenMetalGradient | 000000, 98E098, 000060, F0FFF0, 0000B0, D8F0D8, 000100, 98E098 |
| blueMetalGradient | 000000, 9898E0, 000060, F0F0FF, 0000B0, D8D8F0, 000100, 9898E0 |
| Argument | Default | Description |
|---|---|---|
| startX | (Mandatory) | The x coordinate of the starting point of the reference gradient line segment. |
| startY | (Mandatory) | The y coordinate of the starting point of the reference gradient line segment. |
| endX | (Mandatory) | The x coordinate of the ending point of the reference gradient line segment. |
| endY | (Mandatory) | The y coordinate of the ending point of the reference gradient line segment. |
| colorArray | (Mandatory) | An array defining the positions and colors of the pixels along the reference gradient line segment. |
| periodic | false | Specifies whether the gradient will repeat itself periodically. If the gradient does not repeat itself, the points that lie beyond the end points of the gradient line segment will assume the colors of the end points. |
A 32-bit integer representing the linear gradient color.
See also:
- linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, colors() as color, periodic as boolean=false) as Integer
- linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as color, endColor as color, periodic as boolean=false) as Integer
- linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as Integer, endColor as Integer, periodic as boolean=false) as Integer
CDDrawAreaMBS.linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as color, endColor as color, periodic as boolean=false) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
- linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, colors() as color, periodic as boolean=false) as Integer
- linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, colors() as Integer, periodic as boolean=false) as Integer
- linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as Integer, endColor as Integer, periodic as boolean=false) as Integer
CDDrawAreaMBS.linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as Integer, endColor as Integer, periodic as boolean=false) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| Argument | Default | Description |
|---|---|---|
| startX | (Mandatory) | The x coordinate of the starting point of the reference gradient line segment. |
| startY | (Mandatory) | The y coordinate of the starting point of the reference gradient line segment. |
| endX | (Mandatory) | The x coordinate of the ending point of the reference gradient line segment. |
| endY | (Mandatory) | The y coordinate of the ending point of the reference gradient line segment. |
| startColor | (Mandatory) | The color at the starting point of the reference gradient line segment. |
| endColor | (Mandatory) | The color at the ending point of the reference gradient line segment. |
| periodic | false | Specifies whether the gradient will repeat itself periodically. If the gradient does not repeat itself, the points that lie beyond the end points of the gradient line segment will assume the colors of the end points. |
A 32-bit integer representing the linear gradient color.
See also:
- linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, colors() as color, periodic as boolean=false) as Integer
- linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, colors() as Integer, periodic as boolean=false) as Integer
- linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as color, endColor as color, periodic as boolean=false) as Integer
CDDrawAreaMBS.load(path as string) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method will overwrite the current DrawArea. The image type is determined based on file extension, which must be png, jpg/jpeg, gif or wbmp/wmp.
| Argument | Default | Description |
|---|---|---|
| filename | (Mandatory) | The filename of the image to be loaded. |
A true value indicates no error. A false value indicates the operation is unsuccessful.
CDDrawAreaMBS.loadData(data as MemoryBlock, ImgType as Integer = -1) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 18.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Optionally provide image type.
Returns true on success or false on failure.
See also:
CDDrawAreaMBS.loadData(data as string, ImgType as Integer = -1) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 18.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Optionally provide image type.
Returns true on success or false on failure.
See also:
CDDrawAreaMBS.loadGIF(path as string) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method will overwrite the current DrawArea.
| Argument | Default | Description |
|---|---|---|
| filename | (Mandatory) | The filename of the image to be loaded. |
A true value indicates no error. A false value indicates the operation is unsuccessful.
CDDrawAreaMBS.loadJPG(path as string) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method will overwrite the current DrawArea.
| Argument | Default | Description |
|---|---|---|
| filename | (Mandatory) | The filename of the image to be loaded. |
A true value indicates no error. A false value indicates the operation is unsuccessful.
CDDrawAreaMBS.loadPNG(path as string) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method will overwrite the current DrawArea.
| Argument | Default | Description |
|---|---|---|
| filename | (Mandatory) | The filename of the image to be loaded. |
A true value indicates no error. A false value indicates the operation is unsuccessful.
CDDrawAreaMBS.loadWMP(path as string) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method will overwrite the current DrawArea.
| Argument | Default | Description |
|---|---|---|
| filename | (Mandatory) | The filename of the image to be loaded. |
A true value indicates no error. A false value indicates the operation is unsuccessful.
The items on this page are in the following plugins: MBS ChartDirector Plugin.