All ChartDirector chart objects contains an internal DrawArea object for drawing the charts. This DrawArea object is accessible via BaseChart.getDrawArea or BaseChart.makeChart3. This allows developers to apply custom graphics operations on the charts.
ChartDirector also supports creating standalone DrawArea objects by calling the DrawArea.DrawArea constructor. One common application is to use ChartDirector as a general purpose graphics library (e.g. adding text annotations to existing images, creating GIF buttons on the fly, etc).
Method | Inherited | Description |
---|---|---|
DrawArea | (Self) | Creates a DrawArea object. |
setSize | (Self) | Sets the size and background color of the drawing surface. |
resize | (Self) | Resize the drawing surface. |
getWidth | (Self) | Gets the width of the drawing surface. |
getHeight | (Self) | Gets the height of the drawing surface. |
setClipRect | (Self) | Sets the clip rectangle. |
setBgColor | (Self) | Sets the background color of the image. |
move | (Self) | Moves the drawing surface. |
rotate | (Self) | Rotate the drawing surface. |
hFlip | (Self) | Flip the drawing surface along the central horizontal line. |
vFlip | (Self) | Flip the drawing surface along the central vertical line. |
cloneTo | (Self) | Copy the current DrawArea object to another DrawArea object, with optional resizing. |
pixel | (Self) | Draw a pixel. |
getPixel | (Self) | Gets the color of a pixel. |
line | (Self) | Draw a straight line. |
hline | (Self) | Draws a horizontal line. |
vline | (Self) | Draws a vertical line. |
arc | (Self) | Draws a circular or elliptical arc. |
rect | (Self) | Draws a rectangle. |
polygon | (Self) | Draws a polygon. |
surface | (Self) | Draws a parallelogram. |
sector | (Self) | Draws a circular or elliptical sector. |
cylinder | (Self) | Draws a cylinder surface as the area spanned by moving an arc. |
circle | (Self) | Draws a circle or an ellipse. |
fill | (Self) | Flood fill a region using the specified color. |
fill2 | (Self) | Fill a region using the specified color, where the region is bounded by a given border color. |
text | (Self) | Draws text. This method is a simplified version of the DrawArea.text2 method. |
text2 | (Self) | Draws text. |
text3 | (Self) | Creates a TTFText object representing a text block. This method is a simplified version of the DrawArea.text4 method. |
text4 | (Self) | Creates a TTFText object representing a text block. |
setDefaultFonts | (Self) | Sets the defaults for normal, bold, italic and bold-italic fonts. |
setFontTable | (Self) | Sets an entry in the font table to the specified font name. |
merge | (Self) | Copy another DrawArea to the current DrawArea. |
tile | (Self) | Copy another DrawArea to the current DrawArea as a wallpaper. |
setSearchPath | (Self) | Sets the file system search path for loading image files. |
load | (Self) | Load an image file into the current DrawArea. |
loadPNG | (Self) | Load a PNG image into the current DrawArea. |
loadGIF | (Self) | Load a GIF image into the current DrawArea. |
loadJPG | (Self) | Load a JPG image into the current DrawArea. |
loadWMP | (Self) | Load a WAP bitmap image into the current DrawArea. |
rAffineTransform | (Self) | Perform reverse affine transformation on the drawing surface. |
affineTransform | (Self) | Perform affine transformation on the drawing surface. |
sphereTransform | (Self) | Wraps the drawing surface onto a sphere or ellipsoid. |
hCylinderTransform | (Self) | Wraps the drawing surface onto a horizontal cylinder. |
vCylinderTransform | (Self) | Wraps the drawing surface onto a vertical cylinder. |
hTriangleTransform | (Self) | Wraps the drawing surface onto a horizontal triangle pointing leftwards. |
vTriangleTransform | (Self) | Wraps the drawing surface onto a vertical triangle pointing upwards. |
shearTransform | (Self) | Shear the drawing surface. |
waveTransform | (Self) | Moves the pixels on the drawing surface according to a sinusoidal function to achieve a wave effect. |
enableVectorOutput | (Self) | Enables true vector graphics output. |
out | (Self) | Writes the DrawArea to an image file. |
outPNG | (Self) | Writes the DrawArea to a PNG image file. |
outPNG2 | (Self) | Writes the DrawArea as a PNG image to memory. |
outGIF | (Self) | Writes the DrawArea to a GIF image file. |
outGIF2 | (Self) | Writes the DrawArea as a GIF image to memory. |
outJPG | (Self) | Writes the DrawArea to a JPEG image file. |
outJPG2 | (Self) | Writes the DrawArea as a JPEG image to memory. |
outBMP | (Self) | Writes the DrawArea to a BMP image file. |
outBMP2 | (Self) | Writes the DrawArea as a BMP image to memory. |
outWMP | (Self) | Writes the DrawArea to a WAP bitmap image file. |
outWMP2 | (Self) | Writes the DrawArea as a WAP bitmap image to memory. |
outSVG | (Self) | Writes the DrawArea to a SVG or SVGZ image file. |
outSVG2 | (Self) | Writes the DrawArea as a SVG or SVGZ image to memory. |
setPaletteMode | (Self) | Sets the palette mode to use when writing the image in PNG format. |
setDitherMethod | (Self) | Sets the dithering method in case dithering is necessary. |
setTransparentColor | (Self) | Specifies a certain color to mean transparent when creating a raster image output, or to include alpha transparency channel in the output. |
setAntiAlias | (Self) | Controls whether anti-alias is used when drawing lines, shapes and text. |
setInterlace | (Self) | Sets the interlace mode when creating the image. |
setColorTable | (Self) | Change the colors in the palette starting with the specified offset position. |
getARGBColor | (Self) | Obtain the ARGB color given a palette color. |
adjustBrightness | (Self) | Creates a color that is a darkened or brightened version of the given color. |
halfColor | (Self) | Creates a color that is half the intensity of the given color. |
dashLineColor | (Self) | Creates a dash line color. |
patternColor | (Self) | Creates a pattern color using an array of colors as the bitmap pattern. |
patternColor2 | (Self) | Creates a pattern color by loading the pattern from an image file. |
linearGradientColor | (Self) | Creates a two-point linear gradient color. |
linearGradientColor2 | (Self) | Creates a multi-point linear gradient color. |
radialGradientColor | (Self) | Creates a two-point radial gradient color. |
radialGradientColor2 | (Self) | Creates a multi-point radial gradient color. |
gradientColor | (Self) | Creates a two-point linear gradient color. |
gradientColor2 | (Self) | Creates a multi-point linear gradient color. |
reduceColors | (Self) | Reduces the number of colors in the image. |