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

Class: Image_Canvas_Color

Source Location: /Image_Canvas-0.3.5/Image/Canvas/Color.php

Class Overview

Image_Color
   |
   --Image_Canvas_Color

Class for color-handling


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 45]
Class for color-handling

This is used to extend the functionality of the current PEAR::Image_Color v0.4. I hope to be allowed to incorporate some of the improvements in a new Image_Color release.



[ Top ]


Method Detail

allocateColor   [line 61]

resource allocateColor( resource &$img, mixed $color)

Allocates a color in the given image.

Userdefined color specifications get translated into an array of rgb values.


Parameters:

resource   &$img     GD-resource
mixed   $color     Any color representation supported by color2RGB()

[ Top ]

color2RGB   [line 84]

array color2RGB( mixed $color)

Convert any color-representation into an array of 4 ints (RGBA).

Userdefined color specifications get translated into an array of rgb values.

  • Return: Array of 4 ints (RGBA-representation)
  • Access: public

Parameters:

mixed   $color     Any color representation supported by Image_Canvas_Color::color2RGB()

[ Top ]

getRange   [line 153]

array getRange( string $degrees)

getRange Given a degree, you can get the range of colors between one color and another color.
  • Return: Array of all the colors, one element for each color.
  • Access: public

Parameters:

string   $degrees     How much each 'step' between the colors we should take.

[ Top ]


Documentation generated on Fri, 27 Jul 2012 07:30:05 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.