ChartDirector 7.0 (Perl Edition)

DrawArea.polyShape


Usage

polyShape(xy, edgeColor, fillColor)

Description

Draws a shape.

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.

Arguments

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.

Return Value

None