Lines Matching refs:def
181 * @param string $def
185 public function addPath($def, $attributes = [])
191 $path->addAttribute('d', $def);
197 * @param string $def
205 $def = $this->textDef($text);
208 $def = $this->defTranslate($def, $x, $y);
215 return $this->addPath($def, $attributes);
225 $def = [];
250 $def[] = $d;
256 return implode(' ', $def);
342 * @param string $def definition
347 public function defTranslate($def, $x = 0, $y = 0)
349 return $this->defApplyMatrix($def, [1, 0, 0, 1, $x, $y]);
354 * @param string $def Definition
360 public function defRotate($def, $angle, $x = 0, $y = 0)
364 return $this->defApplyMatrix($def, [cos($angle), sin($angle), -sin($angle), cos($angle), 0, 0]);
368 $def = $this->defTranslate($def, $x, $y);
369 $def = $this->defRotate($def, $angle);
370 $def = $this->defTranslate($def, -$x, -$y);
371 return $def;
376 * @param string $def definition
381 public function defScale($def, $x = 1, $y = 1)
383 return $this->defApplyMatrix($def, [$x, 0, 0, $y, 0, 0]);
388 * @param string $def
392 public function defApplyMatrix($def, $matrix)
396 preg_match_all('/M[^zZ]*[zZ]/', $def, $shapes);
405 preg_match_all('/[a-zA-Z]+[^a-zA-Z]*/', $def, $instructions);