Releases: meyfa/php-svg
Releases · meyfa/php-svg
v0.4.1
v0.4.0
Features
- SVGNode subclasses expose their tag name through
SVGNode::getName()
(19a0828) - SVGNode subclasses can be constructed with attribute arrays through static
SVGNode::constructFromAttributes()
(302f0e7) - Add SVGReader: well-behaved parsing class (d24184c)
- Use SVGReader for SVGImage's parsing functions (dbbb51a)
- Rewrite serialization process: implement SVGWriter (0208eca)
- POTENTIALLY BREAKING:
SVGNode::toXMLString()
, and therefore also::addAttributesToXMLString()
and::addStylesToXMLString()
, are removed SVGNode::getSerializableAttributes()
andSVGNode::getSerializableStyles()
are added.- SVGWriter class is added for performing the actual serialization. It is used in
SVGImage::toXMLString()
.
- POTENTIALLY BREAKING:
Fixes
- Every attribute is parsed as a style (fixed because of SVGReader)
Style
v0.3.0
Features
- "SVGRasterizer: Eliminating the clunky SVGRenderingHelper" (#6)
- Add SVGRasterizer class (1ee2e2e)
- Add SVGRenderer class + shape subclasses (3314e25, 55fc100, 0616b00, 9298045, 62923e0)
- Add SVGPathParser for parsing
d
attribute (7a007b2) - Add classes for approximating paths and their curves (ebccdc1, 943527a)
- POTENTIALLY BREAKING: Remove SVGRenderingHelper (27e913f)
- POTENTIALLY BREAKING: Implement
SVGNode::rasterize()
instead of::draw()
(1dd4fb9)
- Add autoloader.php as Composer alternative (f126b27)
- Omit trailing semicolons in generated styles (97396ae)
Fixes
- Fix attributes not added to SVGGroup's XML output (57adfff)
- Fix path's
d
attribute included in parsed styles
Style
- Add
SVGNode::addStylesToXMLString()
, reducing amount of duplicated code (0d73475) - Make
COLOR_
RegEx strings in SVG.php constants (88671cc) - Make polygon/-line subclasses of
SVGPolygonalShape
, reducing amount of duplicated code (ca8c0a2) Remove obsolete offset arguments from(invalidated by 1dd4fb9)SVGNode::draw()
(dfe51c4, 2f817a9)- Introduce type hinting in a few places (05f82dd, 1631f8b)
v0.2.0
Features
- Composer support (2a8c1bc, e1bbf3c) (#4)
- Add Bezier (cubic, quadratic) curve drawing to SVGRenderingHelper (54d39b5, 828b2a7)
- Add SVGPath: equivalent of
<path>
, supporting (both relative and absolute) MoveTo, LineTo, CurveTo, Close (c79a699, 32b57fd, bdb17e7, dda7a4d, d37f06a) - Add support for arbitrary node attributes (2a8c1bc) (#4)
- Add support for custom XML namespaces (2a8c1bc) (#4)
Style
v0.1.0
This first alpha release contains features in all three areas the project is targeted at:
- It allows for construction of SVG documents with PHP code. The basic shapes, as well as groups, are supported.
- All implemented shapes can be rasterized (rendered to e.g. PNG). The most important attributes, like "fill", "stroke-width" or "opacity" are supported.
- Every shape that can be constructed from code can also be loaded and parsed from SVG files. Exporting them as such is possible, too.