Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items Next items

CDDrawAreaMBS.setAntiAlias(shapeAntiAlias as boolean=true, textAntiAlias as Integer = 2)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Controls whether anti-alias is used when drawing lines, shapes and text.
Notes:
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.

Feedback, Comments & Corrections

CDDrawAreaMBS.setAntiAliasText(value as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Set how text is antialiased.

Feedback, Comments & Corrections

CDDrawAreaMBS.setBgColor(c as color)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 11.1 Yes Yes Yes Yes No
Function: Same as the other setBgColor method, but uses color instead of integer data type for passing color values.

See also:

Feedback, Comments & Corrections

CDDrawAreaMBS.setBgColor(c as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the background color of the image.
Notes:
ArgumentDefaultDescription
c(Mandatory)The background color of the image.

See also:

Feedback, Comments & Corrections

CDDrawAreaMBS.setClipRect(left as Integer, top as Integer, right as Integer, bottom as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the clip rectangle.
Notes:
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.

Feedback, Comments & Corrections

CDDrawAreaMBS.setColorTable(colors() as color, offset as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 11.1 Yes Yes Yes Yes No
Function: Same as the other setColorTable method, but uses color instead of integer data type for passing color values.

See also:

Feedback, Comments & Corrections

CDDrawAreaMBS.setColorTable(colors() as Integer, offset as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Change the colors in the palette starting with the specified offset position.
Notes:
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:

Feedback, Comments & Corrections

CDDrawAreaMBS.setDefaultFonts(normal as string, bold as string, italic as string, boldItalic as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the defaults for normal, bold, italic and bold-italic fonts.
Notes:
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

Feedback, Comments & Corrections

CDDrawAreaMBS.setDitherMethod(value as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the dithering method in case dithering is necessary.
Notes:
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.

Feedback, Comments & Corrections

CDDrawAreaMBS.setFontTable(index as Integer, font as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets an entry in the font table to the specified font name.
Notes:
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

Feedback, Comments & Corrections

CDDrawAreaMBS.setInterlace(value as boolean)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the interlace mode when creating the image.
Notes:
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.

Feedback, Comments & Corrections

CDDrawAreaMBS.setOutputOptions(options as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 15.1 Yes Yes Yes Yes No
Function: Sets output format options for the next chart output. Currently, only SVG, SVGZ and PDF output formats support output options.
Notes:
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.

Feedback, Comments & Corrections

CDDrawAreaMBS.setPaletteMode(value as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the palette mode to use when writing the image in PNG format.
Notes:
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.

Feedback, Comments & Corrections

CDDrawAreaMBS.setSearchPath(path as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the file system search path for loading image files.
Notes:
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).

Feedback, Comments & Corrections

CDDrawAreaMBS.setSize(width as Integer, height as Integer, bgColor as color)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 11.1 Yes Yes Yes Yes No
Function: Same as the other setSize method, but uses color instead of integer data type for passing color values.

See also:

Feedback, Comments & Corrections

CDDrawAreaMBS.setSize(width as Integer, height as Integer, bgColor as Integer = &hFFFFFF)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Sets the size and background color of the drawing surface.
Notes:
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:

Feedback, Comments & Corrections

CDDrawAreaMBS.setTransparentColor(value as color)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 11.1 Yes Yes Yes Yes No
Function: Same as the other setTransparentColor method, but uses color instead of integer data type for passing color values.

See also:

Feedback, Comments & Corrections

CDDrawAreaMBS.setTransparentColor(value as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Specifies a certain color to mean transparent when creating the image output, or to include alpha transparency channel in the output.
Notes:
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:

Feedback, Comments & Corrections

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 Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Shear the drawing surface.
Notes:
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:

Feedback, Comments & Corrections

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 Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 11.1 Yes Yes Yes Yes No
Function: Same as the other shearTransform method, but uses color instead of integer data type for passing color values.

See also:

Feedback, Comments & Corrections

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 Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 11.1 Yes Yes Yes Yes No
Function: Same as the other sphereTransform method, but uses color instead of integer data type for passing color values.

See also:

Feedback, Comments & Corrections

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 Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Wraps the drawing surface onto a sphere or ellipsoid.
Notes:
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:

Feedback, Comments & Corrections

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 Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 11.1 Yes Yes Yes Yes No
Function: Same as the other surface method, but uses color instead of integer data type for passing color values.

See also:

Feedback, Comments & Corrections

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 Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Draws a parallelogram.
Notes:
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:

Feedback, Comments & Corrections

CDDrawAreaMBS.text(str as string, font as string, fontIndex as Integer, fontHeight as Double, fontWidth as Double, angle as Double, vertical as boolean) as CDTTFTextMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Creates a TTFText object representing a text block.
Notes:
The TTFText object contains methods to measure and draw the text. This method is useful if the size of the text is needed before deciding where the draw it.
ArgumentDefaultDescription
text(Mandatory)A string representing the text to be drawn. See ChartDirector Mark Up Language on how to embed special tags in the text for sophisticated formatting.
font(Mandatory)The font name. See Font Specification for details on various font attributes.
fontIndex(Mandatory)The font index in case the font name refers to a font collection. An index of 0 means the first font.
fontHeight(Mandatory)The font height in points.
fontWidth(Mandatory)The font width in points.
angle(Mandatory)The rotation angle of the text.
vertical(Mandatory)A true value means the text is layout vertically (from top to bottom). A false value means the is layout horizontally (from left to right).
Return Value
The TTFText object created.

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

See also:

Feedback, Comments & Corrections

CDDrawAreaMBS.text(str as string, font as string, fontIndex as Integer, fontHeight as Double, fontWidth as Double, angle as Double, vertical as boolean, x as Integer, y as Integer, colorvalue as Integer, alignment as Integer = 7)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Draws text.
Notes:
ArgumentDefaultDescription
str(Mandatory)A string representing the text to be drawn. See ChartDirector Mark Up Language on how to embed special tags in the text for sophisticated formatting.
font(Mandatory)The font name. See Font Specification for details on various font attributes.
fontIndex(Mandatory)The font index in case the font name refers to a font collection. An index of 0 means the first font.
fontHeight(Mandatory)The font height in points.
fontWidth(Mandatory)The font width in points.
angle(Mandatory)The rotation angle of the text. The angle is measured in degrees in clockwise direction.
vertical(Mandatory)A true value means the text is layout vertically (from top to bottom). A false value means the is layout horizontally (from left to right).
x(Mandatory)The x coordinate of a reference point to align the text.
y(Mandatory)The y coordinate of a reference point to align the text.
color(Mandatory)The color of the text.
alignmentTopLeftThe position of the text relative to the reference point. See Alignment Specification for supported alignment types.

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

See also:

Feedback, Comments & Corrections

CDDrawAreaMBS.text(str as string, font as string, fontsize as Double) as CDTTFTextMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Creates a TTFText object representing a text block.
Notes:
The TTFText object contains methods to measure and draw the text. This method is useful if the size of the text is needed before deciding where the draw it.
ArgumentDefaultDescription
str(Mandatory)A string representing the text to be drawn. See ChartDirector Mark Up Language on how to embed special tags in the text for sophisticated formatting.
font(Mandatory)The font name. See Font Specification for details on various font attributes.
fontSize(Mandatory)The font size in points.
Return Value
The TTFText object created.

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

See also:

Feedback, Comments & Corrections

CDDrawAreaMBS.text(str as string, font as string, fontsize as Double, x as Integer, y as Integer, colorvalue as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method ChartDirector MBS ChartDirector Plugin 8.2 Yes Yes Yes Yes No
Function: Draws text.
Notes:
ArgumentDefaultDescription
str(Mandatory)A string representing the text to be drawn. See ChartDirector Mark Up Language on how to embed special tags in the text for sophisticated formatting.
font(Mandatory)The font name. See Font Specification for details on various font attributes.
fontSize(Mandatory)The font size in points.
x(Mandatory)The x coordinate of the top-left corner of the text.
y(Mandatory)The y coordinate of the top-left corner of the text.
color(Mandatory)The color of the text.

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

See also:

Feedback, Comments & Corrections

Previous items Next items

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





Links
MBS Xojo Plugins