ChartDirector Ver 3.1 (PHP Edition Edition)

DrawArea.patternColor2


Usage

patternColor2(filename[, startX, startY])

Description

Create a pattern color by loading the pattern from an image file.

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.

ChartDirector will automatically detect the image file format using the file extension, which must either png, jpg, jpeg, gif, wbmp or wmp (case insensitive).

Please refer to DrawArea.setSearchPath on the directory that ChartDirector will search for the file.

Arguments

ArgumentDefaultDescription
filename(Mandatory)An image file providing the pattern.
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.