1 | <?php |
||
26 | class SVG extends Base implements ContainerInterface, ElementFactoryInterface, SVGOutputInterface |
||
27 | { |
||
28 | use ElementTrait, ChildTrait; |
||
29 | |||
30 | /** |
||
31 | * @var XMLDocumentInterface |
||
32 | */ |
||
33 | private $svg; |
||
34 | |||
35 | /** |
||
36 | * @var OutputInterface |
||
37 | */ |
||
38 | private $outputImpl; |
||
39 | |||
40 | 150 | public function __construct($width = 640, $height = 480, XMLDocumentInterface $dom = null) |
|
62 | |||
63 | /** |
||
64 | * @param array $assoc |
||
65 | * |
||
66 | * @return SVG |
||
67 | */ |
||
68 | 150 | public function apply(array $assoc) |
|
74 | |||
75 | /** |
||
76 | * @param $width |
||
77 | * @param $height |
||
78 | * @param XMLDocumentInterface|null $dom |
||
79 | * |
||
80 | * @return SVG |
||
81 | */ |
||
82 | public static function create($width, $height, XMLDocumentInterface $dom = null) |
||
86 | |||
87 | 3 | public function getRoot() |
|
91 | |||
92 | 3 | public function getName() |
|
96 | |||
97 | /** |
||
98 | * @return DOMElement |
||
99 | */ |
||
100 | 150 | public function getElement() |
|
104 | |||
105 | 150 | public function createElement($name, $value = null, $attributes = []) |
|
113 | |||
114 | 1 | public function __toString() |
|
118 | |||
119 | 61 | public function draw() |
|
123 | |||
124 | /** |
||
125 | * @inheritdoc |
||
126 | */ |
||
127 | 1 | public function copy(array $apply = [], array $ignore = [], ContainerInterface $parent = null) |
|
131 | |||
132 | /** |
||
133 | * Returns escaped svg as plain text. |
||
134 | * |
||
135 | * @return string |
||
136 | */ |
||
137 | 1 | public function asString() |
|
141 | |||
142 | /** |
||
143 | * @inheritdoc |
||
144 | */ |
||
145 | 1 | public function asSVG() |
|
149 | |||
150 | /** |
||
151 | * @inheritdoc |
||
152 | */ |
||
153 | 2 | public function asSVGZ($sendHeader = false) |
|
161 | |||
162 | /** |
||
163 | * @inheritdoc |
||
164 | */ |
||
165 | 1 | public function asDataUriBase64() |
|
172 | |||
173 | /** |
||
174 | * @inheritdoc |
||
175 | */ |
||
176 | 2 | public function asFile($name, $prettyPrint = false, $override = false) |
|
184 | |||
185 | /** |
||
186 | * @inheritdoc |
||
187 | */ |
||
188 | public function asImageFile($name, $format = IOFormat::PNG, $override = false) |
||
197 | |||
198 | /** |
||
199 | * @inheritdoc |
||
200 | */ |
||
201 | public function asImage($format = IOFormat::PNG, $sendHeader = false) |
||
209 | |||
210 | public static function fromString($svgString) |
||
214 | } |
||
215 |