Platforms to show: All Mac Windows Linux Cross-Platform

Back to CDDrawAreaMBS class.

Previous items Next items

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
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
Draws a rectangle.

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
Reduces the number of colors in the image.

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
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
Resize the drawing surface.

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.rotate(angle as Double, bgColor as color, cx as Double = -1, cy as Double = -1, 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
Same as the other rotate method, but uses color instead of integer data type for passing color values.

See also:

CDDrawAreaMBS.rotate(angle as Double, bgColor as Integer = &hFFFFFF, cx as Double = -1, cy as Double = -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
Rotate the drawing surface.

ArgumentDefaultDescription
angle(Mandatory)The rotation angle measured clockwise in degrees.
bgColorFFFFFFThe background color used to fill the space left after rotation.
cx-1The x coordinate of the center of rotation. -1 means rotating about the center of the drawing surface.
cy-1The y coordinate of the center of rotation. -1 means rotating about the center of the drawing surface.
filterLinearFilterThe filter to use for re-sampling.
blur1The blur factor to use for re-sampling.

See also:

CDDrawAreaMBS.sector(cx as Integer, cy as Integer, rx as Integer, ry as Integer, a1 as Double, a2 as Double, 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
Same as the other sector method, but uses color instead of integer data type for passing color values.

See also:

CDDrawAreaMBS.sector(cx as Integer, cy as Integer, rx as Integer, ry as Integer, a1 as Double, a2 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
Draws a circular or elliptical sector.

ArgumentDefaultDescription
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 sector in degrees. The angle is measured clockwise, with 0 degree being the upward pointing direction.
a2(Mandatory)The end angle of the sector in degrees. The angle is measured clockwise, with 0 degree being the upward pointing direction.
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.setAntiAlias(shapeAntiAlias as boolean=true, textAntiAlias as Integer = 2)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Controls whether anti-alias is used when drawing lines, shapes and text.

For anti-aliasing text, ChartDirector supports the following modes.

ConstantValueDescription
NoAntiAlias0Disable anti-alias when drawing text
AntiAlias1Always use anti-alias when drawing text
AutoAntiAlias2Automatically determine if anti-alias should be used for the text. This is the default.

Currently, ChartDirector will anti-alias only large or bold fonts. For small fonts, assuming it is of high quality, anti-alias is unnecessary. It is because high quality fonts are normally designed to be sharp and clear at low resolution. Anti-aliasing will blur the fonts and make them look worse.

However, for complicated fonts (e.g. some fonts with oriental characters), or for lower quality fonts (e.g. some freeware fonts), anti-alias may be necessary. In this case, it may be needed to force anti-aliasing of all fonts using AntiAlias mode.

ArgumentDefaultDescription
shapeAntiAliastrueA true value enables anti-alias when drawing lines and shapes. A false value disables anti-alias when drawing lines and shapes
textAntiAliasAutoAntiAliasThe text anti-alias mode, which must be one of AutoAntiAlias, AntiAlias or NoAntiAlias.

CDDrawAreaMBS.setAntiAliasText(value as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Set how text is antialiased.

CDDrawAreaMBS.setBgColor(c as color)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Same as the other setBgColor method, but uses color instead of integer data type for passing color values.

See also:

CDDrawAreaMBS.setBgColor(c as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the background color of the image.

ArgumentDefaultDescription
c(Mandatory)The background color of the image.

See also:

CDDrawAreaMBS.setClipRect(left as Integer, top as Integer, right as Integer, bottom as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the clip rectangle.

When performing graphics operation, only regions inside the clip rectangle will be affected. Regions outside will be unaffected.
ArgumentDefaultDescription
left(Mandatory)The x coordinate of the left side of the clip rectangle.
top(Mandatory)The y coordinate of the top side of the clip rectangle.
right(Mandatory)The x coordinate of the right side of the clip rectangle.
bottom(Mandatory)The y coordinate of the bottom side of the clip rectangle.

CDDrawAreaMBS.setColorTable(colors() as color, offset as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Same as the other setColorTable method, but uses color instead of integer data type for passing color values.

See also:

CDDrawAreaMBS.setColorTable(colors() as Integer, offset as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Change the colors in the palette starting with the specified offset position.

See Color Specification on how colors are represented in ChartDirector.
ArgumentDefaultDescription
colors(Mandatory)An array of colors to replace the colors in the palette.
offset(Mandatory)The position in the palette to start the replacement.

See also:

CDDrawAreaMBS.setDefaultFonts(normal as string, bold as string, italic as string, boldItalic as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the defaults for normal, bold, italic and bold-italic fonts.

See Font Specification for details on various font attributes.
ArgumentDefaultDescription
normal(Mandatory)The default normal font. This is the same as the first font in the font table.
bold""The default bold font. This is the same as the second font in the font table. An empty string means the default is unchanged.
italic""The default italic font. This is the same as the third font in the font table. An empty string means the default is unchanged.
boldItalic""The default bold-italic font. This is the same as the fourth font in the font table. An empty string means the default is unchanged.

See font specification here:
http://www.monkeybreadsoftware.net/faq-chartdirectorfontspecification.shtml

CDDrawAreaMBS.setDitherMethod(value as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the dithering method in case dithering is necessary.

Dithering is a process of reducing the colors of an image. It is required if an image has more colors than can be supported by the image format. For example, a GIF image can only have 256 colors. If the actual image contains more than 256 colors, dithering is needed to reduce the colors to less than 256.

The dithering method must be one of the following predefined constants.

ConstantValueDescription
Quantize0ChartDirector will first compute an optimal 256-color palette based on colors on the actual image. It then replaces the color of each pixel with the nearest color in the palette. This is the default method and produces the best result in most cases.
OrderedDither1Use the ordered dithering algorithm with a 4 x 4 matrix, and with the standard web-safe palette. The web-safe palette is a palette compatible with very old browsers (e.g. Netscape 1.x and 2.x browsers) on 256-color displays.

Web-safe palette is not an optimal palette. In most cases, this method is not as good as the Quantize method. Use this method only if you have to use the web-safe palette.
ErrorDiffusion2Similar to OrderedDither but use the Floyd and Steinberg error diffusion algorithm.

ArgumentDefaultDescription
m(Mandatory)The dithering method to use in case dithering is necessary.

CDDrawAreaMBS.setFontTable(index as Integer, font as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets an entry in the font table to the specified font name.

The first 4 fonts in the font table have special significance. They are the defaults for normal, bold, italic and bold-italic fonts.

See Font Specification for details on various font attributes.
ArgumentDefaultDescription
index(Mandatory)An index to the font table, starting from 0.
font(Mandatory)The font name to be put into the font table.

See font specification here:
http://www.monkeybreadsoftware.net/faq-chartdirectorfontspecification.shtml

CDDrawAreaMBS.setInterlace(value as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the interlace mode when creating the image.

Note that in many case an interlaced image is less compressible, and may have a large image size. The default is non-interlace.

Note that this method only applies to image formats that support interlacing (GIF and PNG). It is ignored for image formats that does not support interlacing.
ArgumentDefaultDescription
i(Mandatory)A true value means the image is interlaced. A false value means the image is non-interlaced.

CDDrawAreaMBS.setOutputOptions(options as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 15.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets output format options for the next chart output. Currently, only SVG, SVGZ and PDF output formats support output options.

An output option can be a flag (such as "compress") or an attribute-value pair (such as "width=800"). Multiple output options can be joined using semicolons as delimiters.

SVG Options
SVG OptionTypeDescription
compressFlagCompressed the SVG, that is, output SVGZ.
bitmapFlagRender the chart as a bitmap and output the bitmap as SVG.
noxmldeclFlagDo not include the xml declaration line "<?xml version="1.0" .... >" in the SVG.
nodoctypeFlagDo not include the document type declaration line "<!DOCTYPE svg PUBLIC .... >" in the SVG.
widthFlag / AttributeSpecifies the width attribute of the SVG. By default, ChartDirector will not include the width or height attribute in the SVG output. In this case, the SVG is variable in size and would assume the size of its container. For example, if the SVG is inside a <DIV> block in a web page, it will assume the size of the DIV block. If the "width" option is used as a flag, ChartDirector will include the width attribute in the SVG and set it to the chart width. If the "width" option is used as an attribute (such as "width=800"), ChartDirector will include the width attribute in the SVG and set it to the specified value. The specified value should be some text that is valid as SVG width. Examples are "100" and "75%".
heightFlag / AttributeSpecifies the height attribute of the SVG. See the description on "width" above on how to use it.

PDF Options
PDF OptionTypeDescription
bitmapFlagRender the chart as a bitmap and output the bitmap as PDF.
widthAttributeThe width of the chart in the PDF in pixel unit. By default, ChartDirector will use the pixel width of the chart as the width of the chart in PDF. The "width" attribute can be used to specify an alternative value. The value must be a number.
heightAttributeThe width of the chart in the PDF in pixel unit. See the description on "width" above for how to use it.
pagewidthAttributeThe page width in pixel unit. By default, ChartDirector will set the page width to the same width as the chart. The "pagewidth" attribute can be used to specify an alternative value. The value must be a number.
pageheightAttributeThe page height in pixel unit. By default, ChartDirector will set the page height to the same height as the chart. The "pageheight" attribute can be used to specify an alternative value. The value must be a number.
leftxAttributeThe x coordinate of the left side of the chart within the page in pixel unit. By default, ChartDirector will center the chart in the page. The "leftx" attribute can be used to specify an alternative horizontal position. The coordinate must be a number.
topyAttributeThe y coordinate of the top side of the chart within the page in pixel unit. By default, ChartDirector will center the chart in the page. The "topy" attribute can be used to specify an alternative vertical position. The coordinate must be a number.
dpiAttributeSpecify the factor for conversion from pixel to physical unit.

The PDF viewer will convert the pixel unit into physical unit (eg. inches) so that it can be layout on paper or other physical media. The default conversion factor for the chart is 96 pixels per inch. The "dpi" attribute can be used to specify an alternative value. The value must be a number.

ArgumentDefaultDescription
options(Mandatory)A list of options delimited by semicolons.

CDDrawAreaMBS.setPaletteMode(value as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the palette mode to use when writing the image in PNG format.

The PNG format supports both palette based images and true color images. Palette based images can only have 256 colors, but is smaller in size.

The palette mode must be one of the following predefined constants.

ConstantValueDescription
TryPalette0Use palette mode if the image contains less than 256 colors, otherwise use true color mode. This is the default.
ForcePalette1Use palette mode. If the image contains more than 256 colors, reduce it to 256 colors using dithering (see DrawArea.setDitherMethod).
NoPalette2Use true color mode.

ArgumentDefaultDescription
p(Mandatory)The palette mode for PNG images.

CDDrawAreaMBS.setResource(id as string, data as MemoryBlock)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 18.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Assigns a resource ID to a memory block to allow it to be referenced using a resource path.

Many ChartDirector features, such as BaseChart.setBgImage and the <*img*> tag in CDML, expect a file or resource path for loading an image. If the image happens to be in memory, such as if the image is retrieved from a database, setResource can be used to assign a resource ID to the memory. It can then be referenced using "@/res_id", in which res_id is the resource ID.

The assigned resource ID is only valid for the DrawArea object of which this method is called. Use CDBaseChartMBS.setResourceGlobal to assign a resource ID that is valid for all ChartDirector objects.

This method stores only a pointer to the memory. It does not copy the memory. You must ensure the memory contains valid content for as long as the resource is being used.

ArgumentDefaultDescription
id(Mandatory)The resource ID to be used to reference the memory image.
img(Mandatory)The memory that the image occupies.

While ChartDirector does not copy the data, the MBS Plugin will put the resources in a dictionary to make sure they stay available till the chart is destroyed and avoid a crash.

See also:

CDDrawAreaMBS.setResource(id as string, data as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 18.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Assigns a resource ID to a memory block to allow it to be referenced using a resource path.

Many ChartDirector features, such as BaseChart.setBgImage and the <*img*> tag in CDML, expect a file or resource path for loading an image. If the image happens to be in memory, such as if the image is retrieved from a database, setResource can be used to assign a resource ID to the memory. It can then be referenced using "@/res_id", in which res_id is the resource ID.

The assigned resource ID is only valid for the DrawArea object of which this method is called. Use CDBaseChartMBS.setResourceGlobal to assign a resource ID that is valid for all ChartDirector objects.

This method stores only a pointer to the memory. It does not copy the memory. You must ensure the memory contains valid content for as long as the resource is being used.

ArgumentDefaultDescription
id(Mandatory)The resource ID to be used to reference the memory image.
img(Mandatory)The memory that the image occupies.

While ChartDirector does not copy the data, the MBS Plugin will put the resources in a dictionary to make sure they stay available till the chart is destroyed and avoid a crash.

See also:

CDDrawAreaMBS.setResource(id as string, drawArea as CDDrawAreaMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 18.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Assigns a resource ID to a DrawArea object to allow it to be referenced using a resource path.

This method is the same DrawArea.setResource, except that it assigns the resource ID to a DrawArea object instead of a memory image. This allows the DrawArea object to be reference as an image resource using "@/res_id".

ArgumentDefaultDescription
id(Mandatory)The resource ID to be used to reference the DrawArea object.
drawArea(Mandatory)The DrawArea object to be used as a resource.

While ChartDirector does not copy the draw area, the MBS Plugin will put the resources in a dictionary to make sure they stay available till the chart is destroyed and avoid a crash.

See also:

CDDrawAreaMBS.setSearchPath(path as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the file system search path for loading image files.

Several ChartDirector operations involve loading image files. Examples are wallpapers (BaseChart.setWallpaper), background images (BaseChart.setBgImage and PlotArea.setBackground2), user-defined symbols (DataSet.setDataSymbol2) or for embedding images in text using ChartDirector Mark Up Language.
ArgumentDefaultDescription
path(Mandatory)A list of directories, separated with the path separator of your operating system (";" for Windows, ":" for Linux/UNIX).

CDDrawAreaMBS.setSize(width as Integer, height as Integer, bgColor as color)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Same as the other setSize method, but uses color instead of integer data type for passing color values.

See also:

CDDrawAreaMBS.setSize(width as Integer, height as Integer, bgColor as Integer = &hFFFFFF)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the size and background color of the drawing surface.

ArgumentDefaultDescription
width(Mandatory)The width of the drawing surface in pixels.
height(Mandatory)The height of the drawing surface in pixels.
bgColorFFFFFFThe background color of the drawing surface.

See also:

CDDrawAreaMBS.setTransparentColor(value as color)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Same as the other setTransparentColor method, but uses color instead of integer data type for passing color values.

See also:

CDDrawAreaMBS.setTransparentColor(value as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Specifies a certain color to mean transparent when creating the image output, or to include alpha transparency channel in the output.

There are two types of transparency:

Alpha transparency: In addition to red, green and blue levels, there is a transparency level associated with each pixel, which can range from completely transparent to completely opaque. The data associated with the transparency information is called the alpha channel.

Single color transparency: The image itself has no alpha channel, but a certain color is used to mean completely transparent. For internal drawing, ChartDirector always use alpha transparency. However, when outputting the image as an image file, ChartDirector by default will remove the alpha channel to reduce image size. It is because many image displaying software do not support alpha transparency. For example, the IE browser only supports single color transparency but not alpha transparency.

If you want to use single color transparency in the output, you may specify the transparent color as the argument to the setTransparentColor method. Note that only GIF and PNG can support single color transparency. JPEG, BMP and WBMP cannot support transparency at all.

If you do want to keep the alpha channel in final output, you may pass -1 as the argument to setTransparentColor. Note that the only image format that can support alpha transparency is PNG.

One important thing to note is that the IE browser (and possibly many image displaying software) only supports single color transparency for palette based images with up to 256 colors, but not for true color images. For this reason, if single color transparency is used, ChartDirector will automatically reduce the image to 256 colors if it has more than 256 colors. This may result in lost of image quality, especially if the image contains gradient colors.

Therefore, due to the limitations of the current generations of image displaying software, for highest image quality, sometimes it may be beneficial to not using transparency in image output, but to set the image background color to the same color as the container background.
ArgumentDefaultDescription
c(Mandatory)The color that is designated as the transparent color. If -1 is used, the full alpha transparency channel will be included in the final output.

See also:

CDDrawAreaMBS.shearTransform(xShear as Double, yShear as Double = 0, 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
Shear the drawing surface.

Shearing can be applied along the horizontal direction and/or vertical direction. A rectangle, after shearing, will become a parallelogram.
ArgumentDefaultDescription
xShear(Mandatory)The number of pixels to shear leftwards.
yShear0The number of pixels to shear downwards.
bgColorFFFFFFThe background color used to fill the space left after transformation.
filterLinearFilterThe filter to use for re-sampling.
blur1The blur factor to use for re-sampling.

See also:

CDDrawAreaMBS.shearTransform(xShear as Double, yShear 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
Same as the other shearTransform method, but uses color instead of integer data type for passing color values.

See also:

CDDrawAreaMBS.sphereTransform(xDiameter as Integer, 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
Same as the other sphereTransform method, but uses color instead of integer data type for passing color values.

See also:

CDDrawAreaMBS.sphereTransform(xDiameter as Integer, 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
Wraps the drawing surface onto a sphere or ellipsoid.

ArgumentDefaultDescription
xDiameter(Mandatory)The horizontal diameter of the sphere or ellipsoid in pixels.
yDiameter(Mandatory)The vertical diameter of the sphere or ellipsoid in pixels.
bgColorFFFFFFThe background color used to fill the space left after transformation.
filterLinearFilterThe filter to use for re-sampling.
blur1The blur factor to use for re-sampling.

See also:

CDDrawAreaMBS.surface(cx1 as Double, y1 as Double, x2 as Double, y2 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
Same as the other surface method, but uses color instead of integer data type for passing color values.

See also:

Some examples using this method:

CDDrawAreaMBS.surface(cx1 as Double, y1 as Double, x2 as Double, y2 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
Draws a parallelogram.

ArgumentDefaultDescription
x1(Mandatory)The x coordinate of the first end-point of one line of the parallelogram.
y1(Mandatory)The y coordinate of the first end-point of one line of the parallelogram.
x2(Mandatory)The x coordinate of the second end-point of one line of the parallelogram.
y2(Mandatory)The y coordinate of the second end-point of one line of the parallelogram.
depthX(Mandatory)The x displacement of the line segment that is parallel to the line segment above.
depthY(Mandatory)The y displacement of the line segment that is parallel to the line segment above.
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:

Previous items Next items

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


The biggest plugin in space...