Platforms to show: All Mac Windows Linux Cross-Platform
Back to CDDrawAreaMBS class.
CDDrawAreaMBS.adjustBrightness(c as Integer, brightness as Double) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 9.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
A brightness less than 1 means the color is darkened, while a brightness greater than 1 means the color is brightened. For example, a brightness of 0.5 means the color is half as bright as the original color. If the original color is red, the color will become dark red. Conversely, a brightness of 2 means the color is twice as bright as the original color. If the original color is red, the color will become light red.
Arguments:
Argument | Default | Description |
c | (Mandatory) | The given color. |
brightness | (Mandatory) | A non-negative number represent the factor to darken or brighten the color. |
Return Value
A 32-bit integer representing the darkened or brightened color.
CDDrawAreaMBS.affineTransform(a as Double, b as Double, c as Double, d as Double, e as Double, f as Double, bgColor as color, filter as Integer = 2, blur as Double = 1.0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
CDDrawAreaMBS.affineTransform(a as Double, b as Double, c as Double, d as Double, e as Double, f as Double, bgColor as Integer = &hFFFFFF, filter as Integer = 2, blur as Double = 1.0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
An affine transformation is an operation where every pixel is copied to another pixel according to the formula.
xDest = a * xSrc + b * ySrc + cyDest = d * xSrc + e * ySrc + f
where (xSrc, ySrc) is a source pixel, and (xDest, yDest) is where it should go to.
Many graphics operation, such as translation, rotation, and resizing, can be considered as a special case of affine transformation.
Argument | Default | Description |
a | (Mandatory) | The parameter 'a' in the coordinate transformation formula "xDest = a * xSrc + b * ySrc + c". |
b | (Mandatory) | The parameter 'b' in the coordinate transformation formula "xDest = a * xSrc + b * ySrc + c". |
c | (Mandatory) | The parameter 'c' in the coordinate transformation formula "xDest = a * xSrc + b * ySrc + c". |
d | (Mandatory) | The parameter 'd' in the coordinate transformation formula "yDest = d * xSrc + e * ySrc + f". |
e | (Mandatory) | The parameter 'e' in the coordinate transformation formula "yDest = d * xSrc + e * ySrc + f". |
f | (Mandatory) | The parameter 'f' in the coordinate transformation formula "yDest = d * xSrc + e * ySrc + f". |
bgColor | FFFFFF | The background color used to fill destination pixels that are not mapped to any source pixels. |
filter | LinearFilter | The filter to use for re-sampling. |
blur | 1 | The blur factor to use for re-sampling. |
See also:
CDDrawAreaMBS.angleGradientColor(cx as double, cy as double, a1 as double, a2 as double, r1 as double, r2 as double, c() as integer) as integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 21.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
An angle gradient color is a color that depends on the compass bearing of the pixel relative to the center point. The north (upward) direction is zero degree, and the angle is the clockwise angle from the north direction.
ChartDirector supports "smooth angle gradient" and "step angle gradient". For a smooth angle gradient, the color changes smoothly from one color stop to the next color stop. For a step angle gradient, the color remains unchanged between the color stops, but change abruptly once it reaches the next color stop.
The color stops are defined as an array of offsets and colors. For a smooth angle gradient, the offsets and colors should be in the following format:
offset0, color0, offset1, color1, .... offsetN, colorN
The first offset (offset0) should be 0, which represents the start angle of the gradient, and color0 is the color at that offset. The last offset (offsetN) can be any number not greater than 100000. It represents the end angle of the gradient, and colorN represents the color at the that offset. The other offsets and colors represent the angles and colors of the color stops in between.
For a step angle gradient, the offsets and colors should be in the following format:
offset0, color0, offset1, color1, ...., offsetP, colorP, offsetN
Note that for a step color gradient, there is one more offset than colors. If there are 10 color steps, it will have 10 colors and 11 offsets. The offsets represent angles and are interpreted the same as in smooth angle gradient. The colors are applied between the offsets. For example, color0 is the color between offset0 and offset1, and color1 is the color between offset1 and offset2.
Argument | Default | Description |
cx | (Mandatory) | The x coordinate of the center point. |
cy | (Mandatory) | The y coordinate of the center point. |
a1 | (Mandatory) | The start angle of the gradient. |
a2 | (Mandatory) | The end angle of the gradient. |
r1 | (Mandatory) | The minimum radius for which the gradient is applicable. |
r2 | (Mandatory) | The maximum radius for which the gradient is applicable. |
colorArray | (Mandatory) | An array defining the offsets and colors of the color stops along the gradient. |
Returns a 32-bit integer representing the angle gradient color.
CDDrawAreaMBS.arc(cx as Integer, cy as Integer, rx as Integer, ry as Integer, a1 as Double, a2 as Double, c 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 |
cx | (Mandatory) | The x coordinate of the center of the circle or ellipse. |
cy | (Mandatory) | The y coordinate of the center of the circle or ellipse. |
rx | (Mandatory) | The horizontal radius of the circle or ellipse. |
ry | (Mandatory) | The vertical radius of the circle or ellipse. |
a1 | (Mandatory) | The start angle of the arc in degrees. The angle is measured clockwise, with 0 degree being the upward pointing direction. |
a2 | (Mandatory) | The end angle of the arc in degrees. The angle is measured clockwise, with 0 degree being the upward pointing direction. |
c | (Mandatory) | The color of the arc. |
CDDrawAreaMBS.circle(cx as Integer, cy as Integer, rx as Integer, ry as Integer, edgeColor as color, fillColor as color)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
CDDrawAreaMBS.circle(cx as Integer, cy as Integer, rx as Integer, ry as Integer, edgeColor as Integer, fillColor 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 |
cx | (Mandatory) | The x coordinate of the center of the circle or ellipse. |
cy | (Mandatory) | The y coordinate of the center of the circle or ellipse. |
rx | (Mandatory) | The horizontal radius of the circle or ellipse. |
ry | (Mandatory) | The vertical radius of the circle or ellipse. |
edgeColor | (Mandatory) | The border color. To disable border, set the edgeColor the same as the fillColor. |
fillColor | (Mandatory) | The fill color. To disable filling, set the fillColor to Transparent. |
See also:
CDDrawAreaMBS.clone(d as CDDrawAreaMBS, x as Integer, y as Integer, align as Integer, newWidth as Integer = -1, newHeight as Integer = -1, filter as Integer = 2, blur as Double = 1.0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
d | (Mandatory) | The destination DrawArea object where the current DrawArea is copied to. |
x | (Mandatory) | The x coordinate of a reference point in the destination DrawArea object. |
y | (Mandatory) | The y coordinate of a reference point in the destination DrawArea object. |
align | (Mandatory) | The alignment of the current DrawArea relative to the reference point. See Alignment Specification for supported alignment types. |
newWidth | -1 | The new width to which the current DrawArea will be resized to before copying. The default value -1 means no resizing. |
newHeight | -1 | The new height to which the current DrawArea will be resized to before copying. The default value -1 means no resizing. |
filter | LinearFilter | The filter to use for re-sampling. (Only applies if there is resizing.) |
blur | 1 | The blur factor to use for re-sampling. (Only applies if there is resizing.) |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
CDDrawAreaMBS.cylinder(cx as Integer, cy as Integer, rx as Integer, ry as Integer, a1 as Double, a2 as Double, depthX as Integer, depthY as Integer, edgeColor as color, fillColor as color)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
CDDrawAreaMBS.cylinder(cx as Integer, cy as Integer, rx as Integer, ry as Integer, a1 as Double, a2 as Double, depthX as Integer, depthY as Integer, edgeColor as Integer, fillColor 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 |
cx | (Mandatory) | The x coordinate of the center of the circle or ellipse for the arc. |
cy | (Mandatory) | The y coordinate of the center of the circle or ellipse for the arc. |
rx | (Mandatory) | The horizontal radius of the circle or ellipse. |
ry | (Mandatory) | The vertical radius of the circle or ellipse. |
a1 | (Mandatory) | The start angle of the arc. The angle is measured clockwise, with 0 degree being the upward pointing direction. |
a2 | (Mandatory) | The end angle of the arc. The angle is measured clockwise, with 0 degree being the upward pointing direction. |
depthX | (Mandatory) | The x displacement representing the motion of the arc to span the cylinder. |
depthY | (Mandatory) | The y displacement representing the motion of the arc to span the cylinder. |
edgeColor | (Mandatory) | The border color. To disable border, set the edgeColor the same as the fillColor. |
fillColor | (Mandatory) | The fill color. To disable filling, set the fillColor to Transparent. |
See also:
CDDrawAreaMBS.dashLineColor(colorvalue as color, patternCode as Integer = &h0505) 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:
CDDrawAreaMBS.dashLineColor(colorvalue as Integer, patternCode as Integer = &h0505) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
A dash line color is a dynamic color that switches on and off periodically. When it is used to draw a line, the line will appear as a dash line.
The style of the dash line is defined by a pattern code, which is a 4-byte integer. A value of PPQQRRSS (in hex) means the first PP pixels are turned on, followed by QQ pixels turned off, followed by RR pixels turned on, followed by SS pixels turned off, and then restart from PP again.
ChartDirector comes from several predefined constants for common dash line patterns.
ConstantValue (in Hex)Dash Line Style
DashLine | 00000505 | |
DotLine | 00000202 | |
DotDashLine | 05050205 | |
AltDashLine | 0A050505 |
Argument | Default | Description |
color | (Mandatory) | The color to draw the dash line. |
patternCode | DashLine | A 4-byte integer representing the style of the dash line. |
A 32-bit integer representing the dash line color.
See also:
CDDrawAreaMBS.enableVectorOutput Deprecated
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 9.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
By default, when creating the output image, ChartDirector draws directly onto an output buffer representing the bitmap of the image. For example, for a chart 800 x 600 pixels in size, the output buffer may represent a 800 x 600 bitmap. The output buffer size is unchanged no matter how many items are drawn onto it. Even if the output contains 1 million elements (eg. 1 million symbols), the size of the output buffer is still the same.
On the other hand, a true vector output is indefinitely scalable and can be considered as having infinite resolution. To produce a true vector output, it is necessary to remember the graphics operations for every element in the output buffer. The output buffer size is therefore proportional to the number of elements to draw.
This method tells ChartDirector that it needs to remember the graphics operations to prepare for true vector output. If true vector output is needed, this method should be called immediately after creating the DrawArea object.
If this method is not called, and a vector graphics output format is used (such as SVG), instead of a true vector output, ChartDirector will output a raster image using the vector graphics format. (Most vector graphics formats support embedded raster images.)
CDDrawAreaMBS.fill(x as Integer, y as Integer, colorvalue as color)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
CDDrawAreaMBS.fill(x as Integer, y as Integer, colorvalue as color, borderColor as color)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
CDDrawAreaMBS.fill(x as Integer, y as Integer, colorvalue 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 |
x | (Mandatory) | The x coordinate one pixel inside the region to be filled. |
y | (Mandatory) | The y coordinate one pixel inside the region to be filled. |
color | (Mandatory) | The color used to fill the region. |
See also:
CDDrawAreaMBS.fill(x as Integer, y as Integer, colorvalue as Integer, borderColor 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 |
x | (Mandatory) | The x coordinate one pixel inside the region to be filled. |
y | (Mandatory) | The y coordinate one pixel inside the region to be filled. |
color | (Mandatory) | The color used to fill the region. |
borderColor | (Mandatory) | The color of the border that bounds the region. |
See also:
CDDrawAreaMBS.getARGBColor(c as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If the given color is already in ARGB format, the same value is returned.
Argument | Default | Description |
c | (Mandatory) | The color to be changed to ARGB format. |
The ARGB color converted from the given color.
CDDrawAreaMBS.getHeight as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
CDDrawAreaMBS.getPixel(x as Integer, y as Integer) 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 |
x | (Mandatory) | The x coordinate of the pixel. |
y | (Mandatory) | The y coordinate of the pixel. |
The color of the pixel.
CDDrawAreaMBS.getWidth as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
CDDrawAreaMBS.gradientColor(colors() as color, angle as Double = 90, scale as Double = 1.0, startX as Integer = 0, startY as Integer = 0) 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:
- gradientColor(colors() as Integer, angle as Double = 90, scale as Double = 1.0, startX as Integer = 0, startY as Integer = 0) as Integer
- gradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as color, endColor as color) as Integer
- gradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as Integer, endColor as Integer) as Integer
CDDrawAreaMBS.gradientColor(colors() as Integer, angle as Double = 90, scale as Double = 1.0, startX as Integer = 0, startY as Integer = 0) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method is for backward compatibility. Use DrawArea.linearGradientColor2 instead.
Argument | Default | Description |
colorArray | (Mandatory) | An array defining the positions and colors of the pixels along the reference gradient line segment. |
angle | 90 | The direction of the reference gradient line segment in degrees, measured clockwise, with 0 degree as the upward pointing direction. The default direction is horizontal from left to right (90 degrees). |
scale | 1.0 | The scaling factor for the reference gradient line segment. By default, the reference gradient line segment is 256 pixels in length. The scaling factor can be use to stretch or compress the gradient line segment. |
startX | 0 | The x coordinate of the starting point of the reference gradient line segment. |
startY | 0 | The y coordinate of the starting point of the reference gradient line segment. |
A 32-bit integer representing the linear gradient color.
See also:
- gradientColor(colors() as color, angle as Double = 90, scale as Double = 1.0, startX as Integer = 0, startY as Integer = 0) as Integer
- gradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as color, endColor as color) as Integer
- gradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as Integer, endColor as Integer) as Integer
CDDrawAreaMBS.gradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as color, endColor as color) 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:
- gradientColor(colors() as color, angle as Double = 90, scale as Double = 1.0, startX as Integer = 0, startY as Integer = 0) as Integer
- gradientColor(colors() as Integer, angle as Double = 90, scale as Double = 1.0, startX as Integer = 0, startY as Integer = 0) as Integer
- gradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as Integer, endColor as Integer) as Integer
CDDrawAreaMBS.gradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as Integer, endColor as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method is for backward compatibility. Use DrawArea.linearGradientColor instead.
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. |
A 32-bit integer representing the linear gradient color.
See also:
- gradientColor(colors() as color, angle as Double = 90, scale as Double = 1.0, startX as Integer = 0, startY as Integer = 0) as Integer
- gradientColor(colors() as Integer, angle as Double = 90, scale as Double = 1.0, startX as Integer = 0, startY as Integer = 0) as Integer
- gradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as color, endColor as color) as Integer
CDDrawAreaMBS.halfColor(c as Integer) 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 |
c | (Mandatory) | The given color. |
A 32-bit integer representing the half intensity color.
CDDrawAreaMBS.hCylinderTransform(yDiameter as Integer, bgColor as color, filter as Integer = 2, blur as Double = 1.0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
CDDrawAreaMBS.hCylinderTransform(yDiameter as Integer, bgColor as Integer = &hFFFFFF, filter as Integer = 2, blur as Double = 1.0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
yDiameter | (Mandatory) | The diameter of the cylinder in pixels. |
bgColor | FFFFFF | The background color used to fill the space left after transformation. |
filter | LinearFilter | The filter to use for re-sampling. |
blur | 1 | The blur factor to use for re-sampling. |
See also:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
CDDrawAreaMBS.hline(x1 as Integer, x2 as Integer, y as Integer, c 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 |
x1 | (Mandatory) | The x coordinate of the first end-point of the line. |
x2 | (Mandatory) | The x coordinate of the second end-point of the line. |
y | (Mandatory) | The y coordinate of the line. |
c | (Mandatory) | The color of the line. |
CDDrawAreaMBS.hTriangleTransform(tWidth as Integer = -1, bgColor as Integer = &hFFFFFF, filter as Integer = 2, blur as Double = 1.0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Argument | Default | Description |
tWidth | -1 | The width of the triangle in pixels. |
bgColor | FFFFFF | The background color used to fill the space left after transformation. |
filter | LinearFilter | The filter to use for re-sampling. |
blur | 1 | The blur factor to use for re-sampling. |
See also:
CDDrawAreaMBS.hTriangleTransform(tWidth as Integer, bgColor as color, filter as Integer = 2, blur as Double = 1.0)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
CDDrawAreaMBS.initDynamicLayer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | ChartDirector | MBS ChartDirector Plugin | 12.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method clears the existing dynamic layer, or creates a new one if there is no existing dynamic layer. This method returned a DrawArea object that can be used to draw on the dynamic layer. The dynamic layer can later be removed using BaseChart.removeDynamicLayer.
The design of the dynamic layer is for drawing small, rapidly updatable contents for desktop applications. For example, the dynamic layer can be used to implement a cross-hair mouse cursor, with text showing the location of the mouse cursor. To do this, in the mouse move event handler, BaseChart.initDynamicLayer can be used to create or clear the dynamic layer. The returned DrawArea object can then be used to draw the cross hair cursor (as two straight lines) and the text. When the mouse cursor leaves the chart, BaseChart.removeDynamicLayer can be used in the mouse out event handler to remove the cross-hair cursor and the text.
Note that as long as the dynamic layer is not removed with BaseChart.removeDynamicLayer, only the returned DrawArea object should be used to draw things on the dynamic layer. No other objects should be used to draw on the chart.
Returns a DrawArea object that can be used to add text and shapes to the dynamic layer.
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
The items on this page are in the following plugins: MBS ChartDirector Plugin.