Lines Matching refs:vv

473 					$vv = preg_split('/[ ,]+/', $v);
474 if ($c == 'matrix' && count($vv) == 6) {
475 // Note angle of rotation is reversed (from SVG to PDF), so vv[1] and vv[2] are negated
477 $transformations .= sprintf(' %.3F %.3F %.3F %.3F %.3F %.3F cm ', $vv[0], -$vv[1], -$vv[2], $vv[3], $vv[4] * $this->kp, -$vv[5] * $this->kp);
478 } elseif ($c == 'translate' && count($vv)) {
479 $tm[4] = $vv[0];
480 if (count($vv) == 2) {
481 $t_y = -$vv[1];
487 } elseif ($c == 'scale' && count($vv)) {
488 if (count($vv) == 2) {
489 $s_y = $vv[1];
491 $s_y = $vv[0];
493 $tm[0] = $vv[0];
496 } elseif ($c == 'rotate' && count($vv)) {
497 $tm[0] = cos(deg2rad(-$vv[0]));
498 $tm[1] = sin(deg2rad(-$vv[0]));
501 if (count($vv) == 3) {
502 $transformations .= sprintf(' 1 0 0 1 %.3F %.3F cm ', $vv[1] * $this->kp, -$vv[2] * $this->kp);
505 if (count($vv) == 3) {
506 $transformations .= sprintf(' 1 0 0 1 %.3F %.3F cm ', -$vv[1] * $this->kp, $vv[2] * $this->kp);
508 } elseif ($c == 'skewx' && count($vv)) {
509 $tm[2] = tan(deg2rad(-$vv[0]));
511 } elseif ($c == 'skewy' && count($vv)) {
512 $tm[1] = tan(deg2rad(-$vv[0]));
1146 $vv = preg_split('/[ ,]+/', $v);
1147 if ($c == 'matrix' && count($vv) == 6) {
1149 // Note angle of rotation is reversed (from SVG to PDF), so vv[1] and vv[2] are negated
1150 $transformations .= sprintf(' %.3F %.3F %.3F %.3F %.3F %.3F cm ', $vv[0], -$vv[1], -$vv[2], $vv[3], $vv[4] * $this->kp, -$vv[5] * $this->kp);
1155 $sx=sqrt(pow($vv[0],2)+pow($vv[2],2));
1156 if ($vv[0] < 0) { $sx *= -1; } // change sign
1157 $sy=sqrt(pow($vv[1],2)+pow($vv[3],2));
1158 if ($vv[3] < 0) { $sy *= -1; } // change sign
1161 $t=atan2($vv[1],$vv[3]);
1162 $t=atan2(-$vv[2],$vv[0]); // Should be the same value or skew has been applied
1173 // $transformations .= sprintf(' %.3F %.3F %.3F %.3F %.3F %.3F cm ', $ma, $mb, $mc, $md, $vv[4]*$this->kp, -$vv[5]*$this->kp);
1175 } elseif ($c == 'translate' && count($vv)) {
1176 $tm[4] = $vv[0];
1177 if (count($vv) == 2) {
1178 $t_y = -$vv[1];
1184 } elseif ($c == 'scale' && count($vv)) {
1185 if (count($vv) == 2) {
1186 $s_y = $vv[1];
1188 $s_y = $vv[0];
1190 $tm[0] = $vv[0];
1193 } elseif ($c == 'rotate' && count($vv)) {
1194 $tm[0] = cos(deg2rad(-$vv[0]));
1195 $tm[1] = sin(deg2rad(-$vv[0]));
1198 if (count($vv) == 3) {
1199 $transformations .= sprintf(' 1 0 0 1 %.3F %.3F cm ', $vv[1] * $this->kp, -$vv[2] * $this->kp);
1202 if (count($vv) == 3) {
1203 $transformations .= sprintf(' 1 0 0 1 %.3F %.3F cm ', -$vv[1] * $this->kp, $vv[2] * $this->kp);
1205 } elseif ($c == 'skewx' && count($vv)) {
1206 $tm[2] = tan(deg2rad(-$vv[0]));
1208 } elseif ($c == 'skewy' && count($vv)) {
1209 $tm[1] = tan(deg2rad(-$vv[0]));