ChartDirector 5.1 (PHP Edition)

BaseChart.patternColor2


Usage

patternColor2(filename [, startX, startY ])

Description

Creates 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 BaseChart.setSearchPath on the directory that ChartDirector will search for the file.

Arguments

ArgumentDefaultDescription
filename(Mandatory)An image file providing the pattern.
startX0The x coordinate of a reference point to align with the top-left corner the pattern.
startY0The y coordinate of a reference point to align with the top-left corner the pattern.

Return Value

A 32-bit integer representing the pattern color.