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
Draw a straight line.

ArgumentDefaultDescription
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.
lineWidth1The 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
Draw a straight line.

ArgumentDefaultDescription
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.
lineWidth1The line width (thickness).

See also:

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
Creates a multi-point linear gradient color.

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

ArgumentDefaultDescription
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.
periodicfalseSpecifies 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.
Return Value
A 32-bit integer representing the linear gradient color.

See also:

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
Creates a two-point linear gradient color.

ArgumentDefaultDescription
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.
periodicfalseSpecifies 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.
Return Value
A 32-bit integer representing the linear gradient color.

See also:

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
Load an image file into the current DrawArea.

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.
ArgumentDefaultDescription
filename(Mandatory)The filename of the image to be loaded.
Return Value
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
Loads image from data in MemoryBlock.

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
Loads image from data in String.

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
Load a GIF image into the current DrawArea.

This method will overwrite the current DrawArea.
ArgumentDefaultDescription
filename(Mandatory)The filename of the image to be loaded.
Return Value
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
Load a JPG image into the current DrawArea.

This method will overwrite the current DrawArea.
ArgumentDefaultDescription
filename(Mandatory)The filename of the image to be loaded.
Return Value
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
Load a PNG image into the current DrawArea.

This method will overwrite the current DrawArea.
ArgumentDefaultDescription
filename(Mandatory)The filename of the image to be loaded.
Return Value
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
Load a WAP bitmap image into the current DrawArea.

This method will overwrite the current DrawArea.
ArgumentDefaultDescription
filename(Mandatory)The filename of the image to be loaded.
Return Value
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.


The biggest plugin in space...