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

Class: Image_Color2_Model_Cmyk

Source Location: /Image_Color2-0.1.5/Image/Color2/Model/Cmyk.php

Class Overview


CMYK is a subtractive colormodel used in printing.


Author(s):

Copyright:

  • 2005

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 43]
CMYK is a subtractive colormodel used in printing.

Colors are represented using Cyan, Magenta, Yellow, and blacK components (the K actually stands for key plate which is typically printed in black).

The conversions done by this class are very crude. The results should only be considered as a rough approximation.



[ Top ]


Class Variables

$_c =

[line 48]

Cyan component
  • Var: 0-1
  • Access: protected

Type:   float


[ Top ]

$_k =

[line 63]

Black component
  • Var: 0-1
  • Access: protected

Type:   float


[ Top ]

$_m =

[line 53]

Magneta component
  • Var: 0-1
  • Access: protected

Type:   float


[ Top ]

$_y =

[line 58]

Yellow component
  • Var: 0-1
  • Access: protected

Type:   float


[ Top ]



Method Detail

__construct (Constructor)   [line 72]

Image_Color2_Model_Cmyk __construct( float $c, float $m, float $y, float $k)

Constuct from four floats.
  • Access: protected

Parameters:

float   $c     0.0 - 1.0 Cyan
float   $m     0.0 - 1.0 Magenta
float   $y     0.0 - 1.0 Yellow
float   $k     0.0 - 1.0 Black

[ Top ]

fromArray   [line 121]

Image_Color2_Model_Hsl fromArray( array $array)

  • Access: public

Parameters:

array   $array     An array with four integers between 0 and 100 for the each of the Cyan, Magenta, Yellow and blacK color components.

[ Top ]

fromRgb   [line 92]

Image_Color2_Model_Hsl fromRgb( array $rgb)

  • Access: public

Parameters:

array   $rgb     A PEAR style RGB array containing three integers from 0 to 255 for the Red, Green, and Blue color components followed by a 'type' => 'rgb' element.

[ Top ]

fromString   [line 132]

Image_Color2_Model_Hsl fromString( string $str)

  • Access: public

Parameters:

string   $str     In the format 'C%, M%, Y%, K%'. The percent sign, comma, or space may be used to separate the channels.

[ Top ]

getArray   [line 174]

array getArray( )

  • Access: public

[ Top ]

getRgb   [line 155]

array getRgb( )

  • Return: A PEAR style RGB array containing three integers from 0 to 255 for the Red, Green, and Blue color components followed by a 'type' => 'rgb' element.
  • Access: public

[ Top ]

getString   [line 185]

string getString( )

  • Return: In the format 'C%, M%, Y%, K%'.
  • Access: public

[ Top ]


Documentation generated on Mon, 20 Sep 2010 10:30:02 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.