Graph: ezcGraphColor
[ ]
[ Gallery ]
[ ]
[ ]
[ ]
[ ]
Class: ezcGraphColor
|
ezcGraphColor [
source]
Struct for representing colors in ezcGraph. A color is defined using the common RGBA model with integer values between 0 and 255. An alpha value of zero means full opacity, while 255 means full transparency.
Parents
ezcBaseOptions
|
--ezcGraphColor
Descendents
| Child Class |
Description |
| ezcGraphLinearGradient |
Class representing linear gradient fills. For drivers which cannot draw gradients it falls back to a native ezcGraphColor. In this case the start color of the gradient will be used.
|
| ezcGraphRadialGradient |
Class representing radial gradient fills. For drivers which cannot draw gradients it falls back to a native ezcGraphColor. In this case the start color of the gradient will be used.
|
Properties
|
integer |
read/write
|
$alpha
Alpha RGBA value of color. |
|
integer |
read/write
|
$blue
Blue RGBA value of color. |
|
integer |
read/write
|
$green
Green RGBA value of color. |
|
integer |
read/write
|
$red
Red RGBA value of color. |
Inherited Member Variables
From
ezcBaseOptions:
Method Summary
Inherited Methods
From
ezcBaseOptions :
Methods
create
Tries to parse provided color value
This method can be used to create a color struct from arbritrary color representations. The following values are accepted
- Hexadecimal color definitions, like known from HTML, CSS and SVG
Color definitions like #FF0000, with and and without number sign, where each pair of bytes is interpreted as a color value for the channels RGB(A). These color values may contain up to 4 values, where the last value is considered as the alpha channel.
If an array of integers is provided as input teh value in each channel may be in the span [0 - 255] and is assigned to the color channels RGB(A). Up to four values are used from the array.
If an array of floats is provided as input teh value in each channel may be in the span [0 - 1] and is assigned to the color channels RGB(A). Up to four values are used from the array.
Parameters
| Name |
Type |
Description |
$color |
mixed |
Some kind of color definition |
darken
Returns a copy of the current color darkened by the given factor
Parameters
| Name |
Type |
Description |
$value |
float |
Percent to darken the color |
fromFloatArray
Creates an ezcGraphColor object from an array of floats
Parameters
| Name |
Type |
Description |
$array |
array |
Array of float color values |
fromHex
Creates an ezcGraphColor object from a hexadecimal color representation
Parameters
| Name |
Type |
Description |
$string |
mixed |
Hexadecimal color representation |
fromIntegerArray
Creates an ezcGraphColor object from an array of integers
Parameters
| Name |
Type |
Description |
$array |
array |
Array of integer color values |
invert
Inverts and returns a copy of the current color
transparent
Returns a copy of the current color made more transparent by the given factor
Parameters
| Name |
Type |
Description |
$value |
mixed |
Percent to make color mor transparent |
Last updated: Mon, 21 Dec 2009