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
Rgb.php
Go to the documentation of this file.
1
<?php
24
#require_once 'Zend/Pdf/Element/Numeric.php';
25
26
28
#require_once 'Zend/Pdf/Color.php';
29
38
class
Zend_Pdf_Color_Rgb
extends
Zend_Pdf_Color
39
{
46
private
$_r;
47
54
private
$_g;
55
62
private
$_b;
63
64
72
public
function
__construct
($r, $g, $b)
73
{
75
if
($r < 0) { $r = 0; }
76
if
($r > 1) { $r = 1; }
77
78
if
($g < 0) { $g = 0; }
79
if
($g > 1) { $g = 1; }
80
81
if
($b < 0) { $b = 0; }
82
if
($b > 1) { $b = 1; }
83
84
$this->_r =
new
Zend_Pdf_Element_Numeric
($r);
85
$this->_g =
new
Zend_Pdf_Element_Numeric
($g);
86
$this->_b =
new
Zend_Pdf_Element_Numeric
($b);
87
}
88
97
public
function
instructions
($stroking)
98
{
99
return
$this->_r->toString() .
' '
100
. $this->_g->toString() .
' '
101
. $this->_b->toString() . ($stroking?
" RG\n"
:
" rg\n"
);
102
}
103
109
public
function
getComponents
()
110
{
111
return
array($this->_r->value, $this->_g->value, $this->_b->value);
112
}
113
}
114
Zend_Pdf_Color_Rgb\__construct
__construct($r, $g, $b)
Definition:
Rgb.php:72
Zend_Pdf_Color_Rgb\instructions
instructions($stroking)
Definition:
Rgb.php:97
Zend_Pdf_Element_Numeric
Definition:
Numeric.php:35
Zend_Pdf_Color_Rgb\getComponents
getComponents()
Definition:
Rgb.php:109
Zend_Pdf_Color
Definition:
Color.php:34
Zend_Pdf_Color_Rgb
Definition:
Rgb.php:38