Definition at line 38 of file Rgb.php.
◆ __construct()
__construct |
( |
|
$r, |
|
|
|
$g, |
|
|
|
$b |
|
) |
| |
Object constructor
- Parameters
-
Clamp values to legal limits.
Definition at line 72 of file Rgb.php.
75 if ($r < 0) { $r = 0; }
76 if ($r > 1) { $r = 1; }
78 if ($g < 0) { $g = 0; }
79 if ($g > 1) { $g = 1; }
81 if ($b < 0) { $b = 0; }
82 if ($b > 1) { $b = 1; }
◆ getComponents()
Get color components (color space dependent)
- Returns
- array
Definition at line 109 of file Rgb.php.
111 return array($this->_r->value, $this->_g->value, $this->_b->value);
◆ instructions()
instructions |
( |
|
$stroking | ) |
|
Instructions, which can be directly inserted into content stream to switch color. Color set instructions differ for stroking and nonstroking operations.
- Parameters
-
- Returns
- string
Definition at line 97 of file Rgb.php.
99 return $this->_r->toString() .
' ' 100 . $this->_g->toString() .
' ' 101 . $this->_b->toString() . ($stroking?
" RG\n" :
" rg\n");
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Pdf/Color/Rgb.php