Lines Matching refs:i

55 		for ($i = 0; $i < count($patch_array); $i++) {
56 $this->mpdf->gradients[$n]['stream'].=chr($patch_array[$i]['f']); //start with the edge flag as 8 bit
58 for ($j = 0; $j < count($patch_array[$i]['points']); $j++) {
62 $patch_array[$i]['points'][$j] = (($patch_array[$i]['points'][$j] - $y_min) / ($y_max - $y_min)) * $bpcd;
63 $patch_array[$i]['points'][$j] = $bpcd - $patch_array[$i]['points'][$j];
65 $patch_array[$i]['points'][$j] = (($patch_array[$i]['points'][$j] - $x_min) / ($x_max - $x_min)) * $bpcd;
67 if ($patch_array[$i]['points'][$j] < 0) {
68 $patch_array[$i]['points'][$j] = 0;
70 if ($patch_array[$i]['points'][$j] > $bpcd) {
71 $patch_array[$i]['points'][$j] = $bpcd;
74 $this->mpdf->gradients[$n]['stream'] .= chr(floor($patch_array[$i]['points'][$j] / 256));
75 $this->mpdf->gradients[$n]['stream'] .= chr(floor(round($patch_array[$i]['points'][$j]) % 256));
78 for ($j = 0; $j < count($patch_array[$i]['colors']); $j++) {
81 $this->mpdf->gradients[$n]['stream'] .= $patch_array[$i]['colors'][$j][1];
82 $this->mpdf->gradients[$n]['stream'] .= $patch_array[$i]['colors'][$j][2];
83 $this->mpdf->gradients[$n]['stream'] .= $patch_array[$i]['colors'][$j][3];
84 if (isset($patch_array[$i]['colors'][$j][4]) && ord($patch_array[$i]['colors'][$j][4]) < 100) {
88 $this->mpdf->gradients[$n]['stream'] .= chr(ord($patch_array[$i]['colors'][$j][1]) * 2.55);
89 $this->mpdf->gradients[$n]['stream'] .= chr(ord($patch_array[$i]['colors'][$j][2]) * 2.55);
90 $this->mpdf->gradients[$n]['stream'] .= chr(ord($patch_array[$i]['colors'][$j][3]) * 2.55);
91 $this->mpdf->gradients[$n]['stream'] .= chr(ord($patch_array[$i]['colors'][$j][4]) * 2.55);
92 if (isset($patch_array[$i]['colors'][$j][5]) && ord($patch_array[$i]['colors'][$j][5]) < 100) {
96 $this->mpdf->gradients[$n]['stream'].= $patch_array[$i]['colors'][$j][1];
97 if ($patch_array[$i]['colors'][$j][2] == 1) {
108 for ($i = 0; $i < count($patch_array); $i++) {
110 $this->mpdf->gradients[$n]['stream_trans'] .= chr($patch_array[$i]['f']);
112 for ($j = 0; $j < count($patch_array[$i]['points']); $j++) {
114 $this->mpdf->gradients[$n]['stream_trans'] .= chr(floor($patch_array[$i]['points'][$j] / 256));
115 $this->mpdf->gradients[$n]['stream_trans'] .= chr(floor(round($patch_array[$i]['points'][$j]) % 256));
118 for ($j = 0; $j < count($patch_array[$i]['colors']); $j++) {
121 $this->mpdf->gradients[$n]['stream_trans'] .= chr((int) (ord($patch_array[$i]['colors'][$j][4]) * 2.55));
123 $this->mpdf->gradients[$n]['stream_trans'] .= chr((int) (ord($patch_array[$i]['colors'][$j][5]) * 2.55));
125 $this->mpdf->gradients[$n]['stream_trans'] .= chr((int) (ord($patch_array[$i]['colors'][$j][3]) * 2.55));
178 if ($coords[0] !== false && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i', $coords[0], $m)) {
185 if ($coords[1] !== false && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i', $coords[1], $m)) {
398 // -moz If neither a <point> or <angle> is specified, i.e. the entire function consists of only <stop> values, the gradient
511 for ($i = 0; $i < count($stops); $i++) {
512 if (isset($stops[$i]['offset']) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i', $stops[$i]['offset'], $m)) {
514 $stops[$i]['offset'] = $axis_length ? $tmp / $axis_length : 0;
534 for ($i = 0; $i < count($stops); $i++) {
537 $this->mpdf->gradients[$n]['stops'][$i]['col'] = sprintf('%.3F %.3F %.3F %.3F', ord($stops[$i]['col'][1]) / 100, ord($stops[$i]['col'][2]) / 100, ord($stops[$i]['col'][3]) / 100, ord($stops[$i]['col'][4]) / 100);
539 $this->mpdf->gradients[$n]['stops'][$i]['col'] = sprintf('%.3F', ord($stops[$i]['col'][1]) / 255);
541 $this->mpdf->gradients[$n]['stops'][$i]['col'] = sprintf('%.3F %.3F %.3F', ord($stops[$i]['col'][1]) / 255, ord($stops[$i]['col'][2]) / 255, ord($stops[$i]['col'][3]) / 255);
543 if (!isset($stops[$i]['opacity'])) {
544 $stops[$i]['opacity'] = 1;
545 } elseif ($stops[$i]['opacity'] > 1 || $stops[$i]['opacity'] < 0) {
546 $stops[$i]['opacity'] = 1;
547 } elseif ($stops[$i]['opacity'] < 1) {
550 $this->mpdf->gradients[$n]['stops'][$i]['opacity'] = $stops[$i]['opacity'];
552 if ($i > 0 && $i < (count($stops) - 1)) {
553 if (!isset($stops[$i]['offset']) || (isset($stops[$i + 1]['offset']) && $stops[$i]['offset'] > $stops[$i + 1]['offset']) || $stops[$i]['offset'] < $stops[$i - 1]['offset']) {
554 if (isset($stops[$i - 1]['offset']) && isset($stops[$i + 1]['offset'])) {
555 $stops[$i]['offset'] = ($stops[$i - 1]['offset'] + $stops[$i + 1]['offset']) / 2;
557 for ($j = ($i + 1); $j < count($stops); $j++) {
562 $int = ($stops[$j]['offset'] - $stops[$i - 1]['offset']) / ($j - $i + 1);
563 for ($f = 0; $f < ($j - $i - 1); $f++) {
564 $stops[$i + $f]['offset'] = $stops[$i + $f - 1]['offset'] + $int;
569 $this->mpdf->gradients[$n]['stops'][$i]['offset'] = $stops[$i]['offset'];
575 for ($i = 0; $i < $ns; $i++) {
576 $offs[$i] = $this->mpdf->gradients[$n]['stops'][$i]['offset'];
582 for ($i = 0; $i < $ns; $i++) {
583 $this->mpdf->gradients[$n]['stops'][($ns * $gp) + $i] = $this->mpdf->gradients[$n]['stops'][($ns * ($gp - 1)) + $i];
584 $tmp = $this->mpdf->gradients[$n]['stops'][($ns * ($gp - 1)) + ($ns - 1)]['offset'] + $offs[$i];
586 $this->mpdf->gradients[$n]['stops'][($ns * $gp) + $i]['offset'] = $tmp;
588 $this->mpdf->gradients[$n]['stops'][($ns * $gp) + $i]['offset'] = 1;
632 for ($i = 0; $i < count($bgr); $i++) {
633 $bgr[$i] = preg_replace('/@/', ',', $bgr[$i]);
637 if (preg_match('/(left|center|right|bottom|top|deg|grad|rad)/i', $bgr[0]) && !preg_match('/(<#|rgb|rgba|hsl|hsla)/i', $bgr[0])) {
651 if (preg_match('/([\-]*[0-9\.]+)(deg|grad|rad)/i', $bgr[0], $m)) {
676 if (preg_match('/(\d+)[%]/i', $first[0], $m)) {
678 } elseif (!isset($startx) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i', $first[0], $m)) {
684 if (isset($first[1]) && preg_match('/(\d+)[%]/i', $first[1], $m)) {
686 } elseif (!isset($starty) && isset($first[1]) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i', $first[1], $m)) {
699 // If neither a <point> or <angle> is specified, i.e. the entire function consists of only <stop> values,
724 for ($i = $startStops; $i < count($bgr); $i++) {
726 $el = preg_split('/\s+/', trim($bgr[$i]));
759 for ($i = 0; $i < count($bgr); $i++) {
760 $bgr[$i] = preg_replace('/@/', ',', $bgr[$i]);
769 if (preg_match('/(left|center|right|bottom|top|deg|grad|rad)/i', $bgr[0]) && !preg_match('/(<#|rgb|rgba|hsl|hsla)/i', $bgr[0])) {
775 } elseif (preg_match('/(circle|ellipse|closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)/i', $bgr[0])) {
782 if (preg_match('/(circle|ellipse|closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)/i', $bgr[1])) {
801 if (preg_match('/(\d+)[%]/i', $first[0], $m)) {
803 } elseif (!isset($startx) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i', $first[0], $m)) {
809 if (isset($first[1]) && preg_match('/(\d+)[%]/i', $first[1], $m)) {
811 } elseif (!isset($starty) && isset($first[1]) && preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i', $first[1], $m)) {
825 // If neither a <point> or <angle> is specified, i.e. the entire function consists of only <stop> values,
838 if (preg_match('/(circle|ellipse)/i', $shape_size, $m)) {
841 if (preg_match('/(closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)/i', $shape_size, $m)) {
868 for ($i = $startStops; $i < count($bgr); $i++) {
870 $el = preg_split('/\s+/', trim($bgr[$i]));
909 } elseif (preg_match('/([0-9.]+(px|em|ex|pc|pt|cm|mm|in))/i', $el[1], $m)) {