Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
zendframework1
library
Zend
Pdf
Color
Cmyk.php
Go to the documentation of this file.
1
<?php
23
#require_once 'Zend/Pdf/Element/Numeric.php';
24
25
27
#require_once 'Zend/Pdf/Color.php';
28
37
class
Zend_Pdf_Color_Cmyk
extends
Zend_Pdf_Color
38
{
45
private
$_c;
46
53
private
$_m;
54
61
private
$_y;
62
69
private
$_k;
70
71
80
public
function
__construct
($c, $m, $y, $k)
81
{
82
if
($c < 0) { $c = 0; }
83
if
($c > 1) { $c = 1; }
84
85
if
($m < 0) { $m = 0; }
86
if
($m > 1) { $m = 1; }
87
88
if
($y < 0) { $y = 0; }
89
if
($y > 1) { $y = 1; }
90
91
if
($k < 0) { $k = 0; }
92
if
($k > 1) { $k = 1; }
93
94
$this->_c =
new
Zend_Pdf_Element_Numeric
($c);
95
$this->_m =
new
Zend_Pdf_Element_Numeric
($m);
96
$this->_y =
new
Zend_Pdf_Element_Numeric
($y);
97
$this->_k =
new
Zend_Pdf_Element_Numeric
($k);
98
}
99
108
public
function
instructions
($stroking)
109
{
110
return
$this->_c->toString() .
' '
111
. $this->_m->toString() .
' '
112
. $this->_y->toString() .
' '
113
. $this->_k->toString() . ($stroking?
" K\n"
:
" k\n"
);
114
}
115
121
public
function
getComponents
()
122
{
123
return
array($this->_c->value, $this->_m->value, $this->_y->value, $this->_k->value);
124
}
125
}
126
Zend_Pdf_Color_Cmyk\__construct
__construct($c, $m, $y, $k)
Definition:
Cmyk.php:80
Zend_Pdf_Element_Numeric
Definition:
Numeric.php:35
Zend_Pdf_Color_Cmyk\getComponents
getComponents()
Definition:
Cmyk.php:121
Zend_Pdf_Color
Definition:
Color.php:34
Zend_Pdf_Color_Cmyk\instructions
instructions($stroking)
Definition:
Cmyk.php:108
Zend_Pdf_Color_Cmyk
Definition:
Cmyk.php:37