Path

ez components / documentation / api reference / 2008.1 / graph


Graph: ezcGraphColor

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

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:
protected  ezcBaseOptions::$properties

Method Summary

public static ezcGraphColor create( $color )
Tries to detect type of color color definition and returns an ezcGraphColor object
public ezcGraphColor darken( $value )
Returns a copy of the current color darkened by the given factor
public static ezcGraphColor fromFloatArray( $array )
Creates an ezcGraphColor object from an array of floats
public static ezcGraphColor fromHex( $string )
Creates an ezcGraphColor object from a hexadecimal color representation
public static ezcGraphColor fromIntegerArray( $array )
Creates an ezcGraphColor object from an array of integers
public ezcGraphColor invert( )
Inverts and returns a copy of the current color
public ezcGraphColor transparent( $value )
Returns a copy of the current color made more transparent by the given factor

Inherited Methods

From ezcBaseOptions :
public ezcBaseOptions ezcBaseOptions::__construct()
Construct a new options object.
public void ezcBaseOptions::merge()
Merge an array into the actual options object.
public bool ezcBaseOptions::offsetExists()
Returns if an option exists.
public mixed ezcBaseOptions::offsetGet()
Returns an option value.
public void ezcBaseOptions::offsetSet()
Set an option.
public void ezcBaseOptions::offsetUnset()
Unset an option.

Methods

create

ezcGraphColor create( mixed $color )
Tries to detect type of color color definition and returns an ezcGraphColor object

Parameters

Name Type Description
$color mixed Some kind of color definition

darken

ezcGraphColor darken( float $value )
Returns a copy of the current color darkened by the given factor

Parameters

Name Type Description
$value float Percent to darken the color

fromFloatArray

ezcGraphColor fromFloatArray( $array )
Creates an ezcGraphColor object from an array of floats

Parameters

Name Type Description
$array array Array of float color values

fromHex

ezcGraphColor fromHex( mixed $string )
Creates an ezcGraphColor object from a hexadecimal color representation

Parameters

Name Type Description
$string mixed Hexadecimal color representation

fromIntegerArray

ezcGraphColor fromIntegerArray( $array )
Creates an ezcGraphColor object from an array of integers

Parameters

Name Type Description
$array array Array of integer color values

invert

ezcGraphColor invert( )
Inverts and returns a copy of the current color

transparent

ezcGraphColor transparent( mixed $value )
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: Wed, 18 Jun 2008