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 |
---|---|---|
new DrawArea | (Self) | Create a DrawArea object. |
setSize | (Self) | Set the size and background color of the drawing surface. |
resize | (Self) | Resize the drawing surface. |
getWidth | (Self) | Get the width of the drawing surface. |
getHeight | (Self) | Get the height of the drawing surface. |
setClipRect | (Self) | Set the clip rectangle. |
setBgColor | (Self) | Set the background color of the image. |
move | (Self) | Move 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) | Get the color of a pixel. |
line | (Self) | Draw a straight line. |
hline | (Self) | Draw a horizontal line. |
vline | (Self) | Draw a vertical line. |
arc | (Self) | Draw a circular or elliptical arc. |
rect | (Self) | Draw a rectangle. |
polygon | (Self) | Draw a polygon. |
surface | (Self) | Draw a parallelogram. |
sector | (Self) | Draw a circular or elliptical sector. |
cylinder | (Self) | Draw a cylinder surface as the area spanned by moving an arc. |
circle | (Self) | Draw 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) | Draw text. This method is a simplified version of the DrawArea.text2 method. |
text2 | (Self) | Draw text. |
text3 | (Self) | Create a TTFText object representing a text block. This method is a simplified version of the DrawArea.text4 method. |
text4 | (Self) | Create a TTFText object representing a text block. |
setDefaultFonts | (Self) | Set the defaults for normal, bold, italic and bold-italic fonts. |
setFontTable | (Self) | Set 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) | Set the file system search path for loading image files. |
load | (Self) | Load an image file into the current DrawArea. |
loadGIF | (Self) | Load a GIF image into the current DrawArea. |
loadPNG | (Self) | Load a PNG image into the current DrawArea. |
loadJPG | (Self) | Load a JPEG 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) | Wrap the drawing surface onto a sphere or ellipsoid. |
hCylinderTransform | (Self) | Wrap the drawing surface onto a horizontal cylinder. |
vCylinderTransform | (Self) | Wrap the drawing surface onto a vertical cylinder. |
vTriangleTransform | (Self) | Wrap the drawing surface onto a vertical triangle pointing upwards. |
hTriangleTransform | (Self) | Wrap the drawing surface onto a horizontal triangle pointing leftwards. |
shearTransform | (Self) | Shear the drawing surface. |
waveTransform | (Self) | Move the pixels on the drawing surface according to a sinusoidal function to achieve a wave effect. |
out | (Self) | Write the DrawArea to an image file. |
outGIF | (Self) | Write the DrawArea to an alternative GIF image file. |
outGIF2 | (Self) | Write the DrawArea as an alternative GIF image to memory. |
outPNG | (Self) | Write the DrawArea to a PNG image file. |
outPNG2 | (Self) | Write the DrawArea as a PNG image to memory. |
outJPG | (Self) | Write the DrawArea to a JPEG image file. |
outJPG2 | (Self) | Write the DrawArea as a JPEG image to memory. |
outBMP | (Self) | Write the DrawArea to a BMP image file. |
outBMP2 | (Self) | Write the DrawArea as a BMP to memory. |
outWMP | (Self) | Write the DrawArea to a WAP bitmap image file. |
outWMP2 | (Self) | Write the DrawArea as a WAP bitmap to memory. |
setPaletteMode | (Self) | Set the palette mode to use when writing the image in PNG format. |
setDitherMethod | (Self) | Set the dithering method in case dithering is necessary. |
setTransparentColor | (Self) | Specify a certain color to represent the transparent color when writing the DrawArea to an image file. |
setAntiAlias | (Self) | Control whether anti-alias is used when drawing lines, shapes and text. |
setInterlace | (Self) | Set 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. |
halfColor | (Self) | Create a color that is half the intensity of the given color. |
dashLineColor | (Self) | Create a dash line color. |
patternColor | (Self) | Create a pattern color using an array of colors as the bitmap pattern. |
patternColor2 | (Self) | Create a pattern color by loading the pattern from an image file. |
gradientColor | (Self) | Create a two-point gradient color. |
gradientColor2 | (Self) | Create a multi-point gradient color. |