color
[ class tree: color ] [ index: color ] [ all elements ]

Class: Image_Graph_Color

Source Location: /Graph/Color.php

Class Overview

Image_Graph_Common
   |
   --Image_Graph_Color

RGB Color representation used for advanced manipulation, such as setting alpha channel and/or calculating HSB values.


Methods


Child classes:

Image_Graph_Color_HSB
HSB (Hue, Saturation and Brightness) Color representation used for advanced manipulation, such as setting alpha channel and/or calculating RGB values.

Inherited Methods

Class: Image_Graph_Common

Image_Graph_Common::Image_Graph_Common()
Creates an a instance of Image_Graph_Common.
Image_Graph_Common::add()
Adds an element to the objects element list, the new Image_Graph_elements parent is automatically set
Image_Graph_Common::addColor()
Add a color. Ultimately it should call addColor() from the Image_Graph object
Image_Graph_Common::newColor()
Create a new Image_Graph_color.
Image_Graph_Common::setName()
Sets the name

Class Details

[line 47]
RGB Color representation used for advanced manipulation, such as setting alpha channel and/or calculating HSB values.

It is not necesary to use the Color class for every representable colors. Named colors are simple RGB contant values and can be used for creating Color objects. This is to avoid a large overhead by creating numerous unneeded objects (an object for every named color).




[ Top ]


Class Methods


constructor Image_Graph_Color [line 112]

Image_Graph_Color &Image_Graph_Color( int $red, [int $green = false], [int $blue = false])

Allocate the color



Parameters:

int   $red   The red part of the RGB code
int   $green   The green part of the RGB code
int   $blue   The blue part of the RGB code

[ Top ]

method blue [line 158]

int blue( )

Return the Blue of the RGB value



Tags:

return:  The Blue part


[ Top ]

method brightness [line 190]

int brightness( )

Return the brightness of the color Brightness is the relative lightness or darkness of the color, usually measured as a percentage from 0% (black) to 100% (white).



Tags:

return:  The brightness of the color in percent


[ Top ]

method green [line 149]

int green( )

Return the Green of the RGB value



Tags:

return:  The Green part


[ Top ]

method hue [line 168]

int hue( )

Return the hue of the color.

Hue is the color reflected from or transmitted through an object. It is measured as a location on the standard color wheel, expressed as a degree between 0° and 360°. In common use, hue is identified by the name of the color such as red, orange, or green.




Tags:

return:  The hue of the color in degrees


[ Top ]

method red [line 140]

int red( )

Return the Red of the RGB value



Tags:

return:  The Red part


[ Top ]

method saturation [line 179]

int saturation( )

Return the saturation of the color Saturation, sometimes called chroma, is the strength or purity of the color. Saturation represents the amount of gray in proportion to the hue, measured as a percentage from 0% (gray) to 100% (fully saturated). On the standard color wheel, saturation increases from the center to the edge.



Tags:

return:  The saturation of the color in percent


[ Top ]

method setAlpha [line 130]

void setAlpha( int $alpha)

Set the alpha (opacity) of the color



Parameters:

int   $alpha   The alpha blending value, between 0 (full color) and 255 (transparent)

[ Top ]


Documentation generated on Fri, 12 Nov 2004 08:25:09 +0100 by phpDocumentor 1.3.0RC3