ChartDirector Ver 3.1 (PHP Edition Edition)

DrawArea.patternColor


Usage

patternColor(colorArray, height[, startX, startY])

Description

Create a pattern color using an array of colors as the bitmap pattern.

A pattern color is a dynamic color that changes according to a 2D periodic pattern. When it is used to fill an area, the area will look like being tiled with a wallpaper pattern.

Arguments

ArgumentDefaultDescription
colorArray(Mandatory)An array of colors representing the colors of the bitmap pixels. The color of the pixel at (x, y) should correspond to index (x + y * width - 1) of the array.
height(Mandatory)The height of the bitmap in pixels. (The width is automatically computed as the size of the color array divided by the height.)
startX0The x cooridinate of a reference point to align with the top-left corner the pattern.
startY0The y cooridinate of a reference point to align with the top-left corner the pattern.

Return Value

Return a 32-bit integer acting as a handle to the pattern color. The handle can be used in any ChartDirector API that expects a color as an argument.