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 | 149 | public function __construct($width = 640, $height = 480, XMLDocumentInterface $dom = null) |
|
62 | |||
63 | /** |
||
64 | * @param array $assoc |
||
65 | * |
||
66 | * @return SVG |
||
67 | */ |
||
68 | 149 | public function apply(array $assoc) |
|
74 | |||
75 | 3 | /** |
|
76 | * @param $width |
||
77 | 3 | * @param $height |
|
78 | * @param XMLDocumentInterface|null $dom |
||
79 | * |
||
80 | 3 | * @return SVG |
|
81 | */ |
||
82 | 3 | public static function create($width, $height, XMLDocumentInterface $dom = null) |
|
86 | |||
87 | public function getRoot() |
||
91 | |||
92 | public function getName() |
||
96 | |||
97 | 149 | /** |
|
98 | * @return DOMElement |
||
99 | 149 | */ |
|
100 | public function getElement() |
||
104 | 1 | ||
105 | public function createElement($name, $value = null, $attributes = []) |
||
113 | |||
114 | public function __toString() |
||
118 | |||
119 | public function draw() |
||
123 | |||
124 | /** |
||
125 | 1 | * @inheritdoc |
|
126 | */ |
||
127 | 1 | public function copy(array $apply = [], array $ignore = [], ContainerInterface $parent = null) |
|
131 | |||
132 | /** |
||
133 | 1 | * Returns escaped svg as plain text. |
|
134 | * |
||
135 | 1 | * @return string |
|
136 | */ |
||
137 | public function asString() |
||
141 | 2 | ||
142 | /** |
||
143 | 2 | * @inheritdoc |
|
144 | 1 | */ |
|
145 | 1 | public function asSVG() |
|
149 | |||
150 | /** |
||
151 | * @inheritdoc |
||
152 | */ |
||
153 | 1 | public function asSVGZ($sendHeader = false) |
|
161 | |||
162 | /** |
||
163 | * @inheritdoc |
||
164 | 2 | */ |
|
165 | public function asDataUriBase64() |
||
172 | |||
173 | /** |
||
174 | * @inheritdoc |
||
175 | */ |
||
176 | 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 |