Platforms to show: All Mac Windows Linux Cross-Platform

Previous items Next items

CDDrawAreaMBS.outPicture as picture
Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Writes the DrawArea into a picture.
Notes: Returns nil on any error.
CDDrawAreaMBS.outPNG as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Writes the DrawArea as a PNG image to memory.

See also:

CDDrawAreaMBS.outPNG(file as folderitem) as boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Writes the DrawArea to a PNG image file.
Notes:
ArgumentDefaultDescription
filename(Mandatory)The filename of the output image file.
Return Value
A true value indicates no error. A false value indicates the operation is unsuccessful.

See also:

CDDrawAreaMBS.outSVG(file as folderitem, options as string = "") as boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Writes the DrawArea to a SVG or SVGZ image file.
Notes:
To output true vector graphics in SVG or SVGZ format, please ensure DrawArea.enableVectorOutput is called immediately after creating the DrawArea object. Otherwise the output will be a bitmap image embedded in SVG or SVGZ.

Arguments:
ArgumentDefaultDescription
file(Mandatory)The file of the output image file.
options""A text string specifying optional parameters for the SVG output. Currently, the only supported text string is "compress", which means to create a SVGZ (compressed SVG) instead of a regular SVG.

See also:

Some examples using this method:

CDDrawAreaMBS.outSVG(options as string = "") as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 9.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Writes the DrawArea as a SVG or SVGZ image to memory.
Notes:
To output true vector graphics in SVG or SVGZ format, please ensure DrawArea.enableVectorOutput is called immediately after creating the DrawArea object. Otherwise the output will be a bitmap image embedded in SVG or SVGZ.

Arguments:
ArgumentDefaultDescription
options""A text string specifying optional parameters for the SVG output. Currently, the only supported text string is "compress", which means to create a SVGZ (compressed SVG) instead of a regular SVG.

Return Value
A memory block containing the SVG or SVGZ image.

See also:

CDDrawAreaMBS.outWMP as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Writes the DrawArea as a WAP bitmap image to memory.

See also:

CDDrawAreaMBS.outWMP(file as folderitem) as boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Writes the DrawArea to a WAP bitmap image file.
Notes:
ArgumentDefaultDescription
filename(Mandatory)The filename of the output image file.
Return Value
A true value indicates no error. A false value indicates the operation is unsuccessful.

See also:

CDDrawAreaMBS.patternColor(colors() as Integer, height as Integer, 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
Function: Creates a pattern color using an array of colors as the bitmap pattern.
Notes:
A pattern color is a dynamic color that changes according to a 2D periodic pattern. When it is used to fill an area, the area will look like being tiled with a wallpaper pattern.
ArgumentDefaultDescription
colorArray(Mandatory)An array of colors representing the colors of the bitmap pixels. The color of the pixel at (x, y) should correspond to index (x + y * width - 1) of the array.
height(Mandatory)The height of the bitmap in pixels. (The width is automatically computed as the size of the color array divided by the height.)
startX0The x coordinate of a reference point to align with the top-left corner the pattern.
startY0The y coordinate of a reference point to align with the top-left corner the pattern.
Return Value
A 32-bit integer representing the pattern color.

See also:

CDDrawAreaMBS.patternColor(file as folderitem, 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
Function: Creates a pattern color by loading the pattern from an image file.
Notes:
A pattern color is a dynamic color that changes according to a 2D periodic pattern. When it is used to fill an area, the area will look like being tiled with a wallpaper pattern.

ChartDirector will automatically detect the image file format using the file extension, which must either png, jpg, jpeg, gif, wbmp or wmp (case insensitive).

Please refer to DrawArea.setSearchPath on the directory that ChartDirector will search for the file.
ArgumentDefaultDescription
filename(Mandatory)An image file providing the pattern.
startX0The x coordinate of a reference point to align with the top-left corner the pattern.
startY0The y coordinate of a reference point to align with the top-left corner the pattern.
Return Value
A 32-bit integer representing the pattern color.

See also:

CDDrawAreaMBS.Pixel(x 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
Function: Draw a pixel.
Notes:
ArgumentDefaultDescription
x(Mandatory)The x coordinate of the pixel.
y(Mandatory)The y coordinate of the pixel.
c(Mandatory)The color of the pixel.
CDDrawAreaMBS.polygon(x() as Double, y() as Double, 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
Function: Draws a polygon.
Notes:
ArgumentDefaultDescription
x(Mandatory)An array of numbers representing the x coordinates of the vertices of a polygon.
y(Mandatory)An array of numbers representing the y coordinates of the vertices of a polygon.
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.polygon(x() as Integer, y() 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
Function: Draws a polygon.
Notes:
x(Mandatory)An array of numbers representing the x coordinates of the vertices of a polygon.
y(Mandatory)An array of numbers representing the y coordinates of the vertices of a polygon.
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.
none

See also:

CDDrawAreaMBS.polyShape(xy() as integer, edgeColor as color, fillColor as color)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Draws a shape.
Notes:
A simple shape can be a polygon or an ellipse. A polygon an be specified as an array of numbers (x0, y0, x1, y1, .....) representing the coordinates of the polygon vertices. As a polygon must have at least 3 vertices, the array must contain at least 6 numbers. If it contains only 4 numbers, it is will considered as an ellipse, with the numbers (x, y, rx, ry) interpreted as the coordinates of the center and the horizontal and vertical radii.

A complex shape is composed of multiple simple shapes. For example, a donut is a complex shape composed of two concentric circles. The shape is filled using the even-odd rule. (The web should have a lot of explanation on what is the even-odd rule in graphics.) A complex shape can be specified by including multiple simple shapes in the array, using the NewShape constant to separate them.

ArgumentDefaultDescription
xy(Mandatory)An array of integers specifying the shape.
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.polyShape(xy() as integer, edgeColor as Integer, fillColor as Integer)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Draws a shape.
Notes:
A simple shape can be a polygon or an ellipse. A polygon an be specified as an array of numbers (x0, y0, x1, y1, .....) representing the coordinates of the polygon vertices. As a polygon must have at least 3 vertices, the array must contain at least 6 numbers. If it contains only 4 numbers, it is will considered as an ellipse, with the numbers (x, y, rx, ry) interpreted as the coordinates of the center and the horizontal and vertical radii.

A complex shape is composed of multiple simple shapes. For example, a donut is a complex shape composed of two concentric circles. The shape is filled using the even-odd rule. (The web should have a lot of explanation on what is the even-odd rule in graphics.) A complex shape can be specified by including multiple simple shapes in the array, using the NewShape constant to separate them.

ArgumentDefaultDescription
xy(Mandatory)An array of integers specifying the shape.
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.radialGradientColor(cx as Integer, cy as Integer, rx as Integer, ry as Integer, data() 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
Function: Creates a multi-point radial gradient color.
Notes:
In this method, the color points are defined as an array of radial distances and colors, in the following format:

distance0, color0, distance1, color1, .... distanceN, colorN
The distances are specified as a number from 0 - 256 (0 - 100 in hex), in which 0 represents the center of the gradient defining ellipse, and 256 (100 in hex) represents the perimeter of the gradient defining ellipse.

For example, the array (in hex):

000000, FF0000, 000080, FFFF00, 000100, 00FF00
means the center (000000) is red (FF0000), the mid-point (000080 in hex) is yellow (FFFF00), and the perimeter (000100 in hex) is green (00FF00).
ArgumentDefaultDescription
cx(Mandatory)The x coordinate of the center of the radial gradient.
cy(Mandatory)The y coordinate of the center of the radial gradient.
rx(Mandatory)The horizontal radius of the radial gradient defining ellipse.
ry(Mandatory)The vertical radius of the radial gradient defining ellipse.
colorArray(Mandatory)An array defining the radial distances and colors.
periodicfalseSpecifies whether the gradient will repeat itself periodically. If the gradient does not repeat itself, the points that lie outside the gradient defining ellipse will assume the color at the perimeter of the gradient defining ellipse.
Return Value
A 32-bit integer representing the radial gradient color.

See also:

CDDrawAreaMBS.radialGradientColor(cx as Integer, cy as Integer, rx as Integer, ry 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
Function: Creates a two-point radial gradient color.
Notes:
ArgumentDefaultDescription
cx(Mandatory)The x coordinate of the center of the radial gradient.
cy(Mandatory)The y coordinate of the center of the radial gradient.
rx(Mandatory)The horizontal radius of the radial gradient defining ellipse.
ry(Mandatory)The vertical radius of the radial gradient defining ellipse.
startColor(Mandatory)The color at the center of the gradient defining ellipse.
endColor(Mandatory)The color at the perimeter of the gradient defining ellipse.
periodicfalseSpecifies whether the gradient will repeat itself periodically. If the gradient does not repeat itself, the points that lie outside the gradient defining ellipse will assume the color at the perimeter of the gradient defining ellipse.
Return Value
A 32-bit integer representing the radial gradient color.

See also:

CDDrawAreaMBS.rAffineTransform(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
Function: Perform reverse affine transformation on the drawing surface.
Notes:
A reverse affine transformation is an operation where every pixel is copied from another pixel according to the formula.

xSrc = a * xDest + b * yDest + cySrc = d * xDest + e * yDest + f
where (xDest, yDest) is a destination pixel, and (xSrc, ySrc) is where it should come from.

Many graphics operation, such as translation, rotation, and resizing, can be considered as a special case of reverse affine transformation.
ArgumentDefaultDescription
a(Mandatory)The parameter 'a' in the coordinate transformation formula "xSrc = a * xDest + b * yDest + c".
b(Mandatory)The parameter 'b' in the coordinate transformation formula "xSrc = a * xDest + b * yDest + c".
c(Mandatory)The parameter 'c' in the coordinate transformation formula "xSrc = a * xDest + b * yDest + c".
d(Mandatory)The parameter 'd' in the coordinate transformation formula "ySrc = d * xDest + e * yDest + f".
e(Mandatory)The parameter 'e' in the coordinate transformation formula "ySrc = d * xDest + e * yDest + f".
f(Mandatory)The parameter 'f' in the coordinate transformation formula "ySrc = d * xDest + e * yDest + f".
bgColorFFFFFFThe background color used to fill destination pixels that are not mapped to any source pixels.
filterLinearFilterThe filter to use for re-sampling.
blur1The blur factor to use for re-sampling.

See also:

CDDrawAreaMBS.rect(x1 as Integer, y1 as Integer, x2 as Integer, y2 as Integer, edgeColor as color, fillColor as color, raisedEffect as Integer = 0)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Same as the other rect method, but uses color instead of integer data type for passing color values.

See also:

CDDrawAreaMBS.rect(x1 as Integer, y1 as Integer, x2 as Integer, y2 as Integer, edgeColor as Integer, fillColor as Integer, raisedEffect as Integer = 0)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Draws a rectangle.
Notes:
ArgumentDefaultDescription
x1(Mandatory)The x coordinate of one corner of the rectangle.
y1(Mandatory)The y coordinate of one corner of the rectangle.
x2(Mandatory)The x coordinate of the opposite corner of the rectangle.
y2(Mandatory)The y coordinate of the opposite corner of the rectangle.
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.
raisedEffect0The 3D border width. For positive values, the border will appear raised. For negative values, the border will appear depressed. A zero value means the border will appear flat. This argument is also used to support CDBaseChartMBS.glassEffect and CDBaseChartMBS.softLighting effects.

See also:

CDDrawAreaMBS.reduceColors(colorCount as Integer, blackAndWhite 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
Function: Reduces the number of colors in the image.
Notes:
The colors in the image will be reduced to at most the number of colors specified, which should be 16 - 256. You may also set the image to black and white. In this case, the color count means number of grey levels.

The colors will be reduced by computing an optimal palette for the image. The image will then be converted using the palette based on the current dithering settings (see DrawArea.setDitherMethod).
ArgumentDefaultDescription
colorCount(Mandatory)The maximum number of colors that image should have after after reduction. Must be between 16 - 256.
blackAndWhitefalseA true value means the image will be converted to black and white (with grey levels). A false value means the image will not be converted to black and white.
Return Value
The actual number of colors the converted image has.
CDDrawAreaMBS.removeDynamicLayer(keepOriginal as boolean = false)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Removes the dynamic layer if any.
CDDrawAreaMBS.resize(newWidth as Integer, newHeight as Integer, filter as Integer = 1, 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
Function: Resize the drawing surface.
Notes:
ArgumentDefaultDescription
newWidth(Mandatory)The new width of the drawing surface in pixels.
newHeight(Mandatory)The new height of the drawing surface in pixels.
filterLinearFilterThe filter to use for re-sampling.
blur1The blur factor to use for re-sampling.
CDDrawAreaMBS.ring(cx as Integer, cy as Integer, rx as Integer, ry as Integer, rx2 as Integer, ry2 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
Function: Same as the other ring method, but uses color instead of integer data type for passing color values.

See also:

Previous items Next items

The items on this page are in the following plugins: MBS ChartDirector Plugin.

Feedback: Report problem or ask question.

The biggest plugin in space...


Start Chat