本文整理汇总了PHP中TCPDF_COLORS::getColorStringFromArray方法的典型用法代码示例。如果您正苦于以下问题:PHP TCPDF_COLORS::getColorStringFromArray方法的具体用法?PHP TCPDF_COLORS::getColorStringFromArray怎么用?PHP TCPDF_COLORS::getColorStringFromArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCPDF_COLORS
的用法示例。
在下文中一共展示了TCPDF_COLORS::getColorStringFromArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _putannotsobjs
//.........这里部分代码省略.........
$annots .= ' >>';
} else {
$annots .= ' /Border [';
if (isset($pl['opt']['border']) and count($pl['opt']['border']) >= 3) {
$annots .= intval($pl['opt']['border'][0]) . ' ';
$annots .= intval($pl['opt']['border'][1]) . ' ';
$annots .= intval($pl['opt']['border'][2]);
if (isset($pl['opt']['border'][3]) and is_array($pl['opt']['border'][3])) {
$annots .= ' [';
foreach ($pl['opt']['border'][3] as $dash) {
$annots .= intval($dash) . ' ';
}
$annots .= ']';
}
} else {
$annots .= '0 0 0';
}
$annots .= ']';
}
if (isset($pl['opt']['be']) and is_array($pl['opt']['be'])) {
$annots .= ' /BE <<';
$bstyles = array('S', 'C');
if (isset($pl['opt']['be']['s']) and in_array($pl['opt']['be']['s'], $bstyles)) {
$annots .= ' /S /' . $pl['opt']['bs']['s'];
} else {
$annots .= ' /S /S';
}
if (isset($pl['opt']['be']['i']) and $pl['opt']['be']['i'] >= 0 and $pl['opt']['be']['i'] <= 2) {
$annots .= ' /I ' . sprintf(' %F', $pl['opt']['be']['i']);
}
$annots .= '>>';
}
if (isset($pl['opt']['c']) and is_array($pl['opt']['c']) and !empty($pl['opt']['c'])) {
$annots .= ' /C ' . TCPDF_COLORS::getColorStringFromArray($pl['opt']['c']);
}
//$annots .= ' /StructParent ';
//$annots .= ' /OC ';
$markups = array('text', 'freetext', 'line', 'square', 'circle', 'polygon', 'polyline', 'highlight', 'underline', 'squiggly', 'strikeout', 'stamp', 'caret', 'ink', 'fileattachment', 'sound');
if (in_array(strtolower($pl['opt']['subtype']), $markups)) {
// this is a markup type
if (isset($pl['opt']['t']) and is_string($pl['opt']['t'])) {
$annots .= ' /T ' . $this->_textstring($pl['opt']['t'], $annot_obj_id);
}
//$annots .= ' /Popup ';
if (isset($pl['opt']['ca'])) {
$annots .= ' /CA ' . sprintf('%F', floatval($pl['opt']['ca']));
}
if (isset($pl['opt']['rc'])) {
$annots .= ' /RC ' . $this->_textstring($pl['opt']['rc'], $annot_obj_id);
}
$annots .= ' /CreationDate ' . $this->_datestring($annot_obj_id, $this->doc_creation_timestamp);
//$annots .= ' /IRT ';
if (isset($pl['opt']['subj'])) {
$annots .= ' /Subj ' . $this->_textstring($pl['opt']['subj'], $annot_obj_id);
}
//$annots .= ' /RT ';
//$annots .= ' /IT ';
//$annots .= ' /ExData ';
}
$lineendings = array('Square', 'Circle', 'Diamond', 'OpenArrow', 'ClosedArrow', 'None', 'Butt', 'ROpenArrow', 'RClosedArrow', 'Slash');
// Annotation types
switch (strtolower($pl['opt']['subtype'])) {
case 'text':
if (isset($pl['opt']['open'])) {
$annots .= ' /Open ' . (strtolower($pl['opt']['open']) == 'true' ? 'true' : 'false');
}