contents   index   previous   next

Color styles

In addition to simple color indexes, all drawing routines can also take a color stype, which is a special string value that allows for more complex fills and shapes. The valid types are:


"styled" - Use the style specified with GD setStyle(). A style is a sequence of colors to be used when drawing lines. It is only valid for line-drawing routines, and is used to make dashed lines.


"brushed" - Use the brush specified with GD setBrush(). A brush is another GD image which is drawn instead of a regular pixel. Using transparent colors, it is possible to create a brush of any size.


"styledBrushed" - A combination of both "styled" and "brushed". The brush is used, but is only drawn when non-transparent pixels are encountered in the style.


"tiled" - Use the tile specified with GD setTile(). This style can only be used with fill routines. It uses the current tile, which can be any GD image, and fills the region with that tile, laying the images side-by-side sequentially.


GD object instance methods