Aspose.Barcode for PHP via Java Generation and Recognition API docs

Public Member Functions

 __construct (int $c, int $m, int $y, int $k)
 
 formatCMYK ()
 

Static Public Member Functions

static parseCMYK (string $cmyk_str)
 

Public Attributes

 $C
 
 $M
 
 $Y
 
 $K
 

Detailed Description

Class for CMYK color. Null means CMYK is not used, default RGB color is in use.

Constructor & Destructor Documentation

◆ __construct()

CMYKColor::__construct ( int  $c,
int  $m,
int  $y,
int  $k 
)

Initializes a new instance of the

class from CMYK values. CMYK values are 0-100.

Parameters
$cCyan value [0, 100]
$mMagenta value [0, 100]
$yYellow value [0, 100]
$kBlack value [0, 100]

Member Function Documentation

◆ formatCMYK()

CMYKColor::formatCMYK ( )

Format this CMYK object into a string "C_M_Y_K", multiplying each component by 100.

Returns
string

◆ parseCMYK()

static CMYKColor::parseCMYK ( string  $cmyk_str)
static

Parse a CMYK string of the form "C_M_Y_K" into a CMYK object.

Parameters
string$str
Returns
CMYK
Exceptions
InvalidArgumentException

Member Data Documentation

◆ $C

CMYKColor::$C

◆ $K

CMYKColor::$K

◆ $M

CMYKColor::$M

◆ $Y

CMYKColor::$Y