Blame view

public/vendor/phenx/php-svg-lib/src/Svg/Surface/SurfaceInterface.php 2.12 KB
86143e36f   Андрей Ларионов   Коммит вторник
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
  <?php
  /**
   * @package php-svg-lib
   * @link    http://github.com/PhenX/php-svg-lib
   * @author  Fabien Ménager <fabien.menager@gmail.com>
   * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
   */
  
  namespace Svg\Surface;
  
  use Svg\Style;
  
  /**
   * Interface Surface, like CanvasRenderingContext2D
   *
   * @package Svg
   */
  interface SurfaceInterface
  {
      public function save();
  
      public function restore();
  
      // transformations (default transform is the identity matrix)
      public function scale($x, $y);
  
      public function rotate($angle);
  
      public function translate($x, $y);
  
      public function transform($a, $b, $c, $d, $e, $f);
  
      // path ends
      public function beginPath();
  
      public function closePath();
  
      public function fill();
  
      public function stroke(bool $close = false);
  
      public function endPath();
  
      public function fillStroke(bool $close = false);
  
      public function clip();
  
      // text (see also the CanvasDrawingStyles interface)
      public function fillText($text, $x, $y, $maxWidth = null);
  
      public function strokeText($text, $x, $y, $maxWidth = null);
  
      public function measureText($text);
  
      // drawing images
      public function drawImage($image, $sx, $sy, $sw = null, $sh = null, $dx = null, $dy = null, $dw = null, $dh = null);
  
      // paths
      public function lineTo($x, $y);
  
      public function moveTo($x, $y);
  
      public function quadraticCurveTo($cpx, $cpy, $x, $y);
  
      public function bezierCurveTo($cp1x, $cp1y, $cp2x, $cp2y, $x, $y);
  
      public function arcTo($x1, $y1, $x2, $y2, $radius);
  
      public function circle($x, $y, $radius);
  
      public function arc($x, $y, $radius, $startAngle, $endAngle, $anticlockwise = false);
  
      public function ellipse($x, $y, $radiusX, $radiusY, $rotation, $startAngle, $endAngle, $anticlockwise);
  
      // Rectangle
      public function rect($x, $y, $w, $h, $rx = 0, $ry = 0);
  
      public function fillRect($x, $y, $w, $h);
  
      public function strokeRect($x, $y, $w, $h);
  
      public function setStyle(Style $style);
  
      /**
       * @return Style
       */
      public function getStyle();
  
      public function setFont($family, $style, $weight);
  }