Skip to content

Releases: meyfa/php-svg

v0.8.0

31 Mar 14:52
5677a18
Compare
Choose a tag to compare

What's Changed

Breaking changes

  • Remove $root parameter of SVGDocumentFragment constructor (def5a72)
    (breaks any code using nested <svg> tags)

Features

Fixes

New Contributors

Full Changelog: v0.7.0...v0.8.0

v0.7.0

20 Jan 12:42
Compare
Choose a tag to compare

What's Changed

Besides internal rewrites, this release offers many fixes for nonconforming behavior. In addition, there is now support for rectangles with rounded corners, the full range of CSS color notation and automatic entity escaping in attributes ("&quot;).

Fixes

  • Fix miscellaneous SVGDocumentFragment test failures (094238d)
  • Remove unnecessary rasterizer clipping (20e64d5)
  • Treat empty namespace string like 'xmlns' (58a43f7)
  • Fix namespaces not added to document fragment by SVGReader (dadcabd)
  • Fix width/height taken from viewBox by SVGReader when explicit attributes are missing (dadcabd)
  • Fix SVG::convertUnit accepting missing value (c9ce6ed)

Features

  • Add support for rounded rectangles (PR #29 by @yoya, PR #34 by @meyfa) (600da3e)
  • Rewrite color parsing algorithm (#36, #37) (203c93e)
  • Decode/Encode XML entities in reader/writer (#39) (a84f8dd)
  • Make SVGNode::setStyle and SVGNode::setAttribute unset properties when given null (0747a98)
  • Remove obsolete SVGNode::setAttributeOptional (#38) (0747a98)
  • Rewrite viewBox parsing for SVGNode (c8c4f6b)

Tests

  • Huge expansion of unit testing suite (work in progress) (see #35)

New Contributors

  • @yoya made their first contribution in #29

Full Changelog: v0.6.1...v0.7.0

v0.6.1

11 Oct 10:06
Compare
Choose a tag to compare

Fixes

  • Reader: Include namespaced attributes (fixes #31) (7e7415d)
  • Interpret MoveTo chains as implicit LineTo commands (e5ae072)
  • Fix opacity calculation for renderers (1518365)

Features

v0.6.0

30 Jul 10:26
Compare
Choose a tag to compare

Breaking changes

  • BREAKING: Update package name and author data (ae8650a)
    • Please change the package name in your Composer file to meyfa/php-svg
  • BREAKING: Shorten vendor namespace to "SVG" (cde475b)
    • Please update all use statements to start with SVG\, e.g. use SVG\SVGImage

Fixes

  • Fix SVGRect::setHeight() setting the width (16d790c)

Features

  • Add support for <image> tag (PR #26) (e2148fb)
    • Add SVGImageRenderer for embedded images (can render URLs as well as data URIs)
    • Add SVGImageElement for <image> tag
  • Add support for <style> tag, improved viewbox, nested docs (PR #27) (67ff696)

Style

v0.5.4

06 Feb 17:00
Compare
Choose a tag to compare

Fixes

  • Trim polygon points attribute when parsing, fixes index error (PR #23) (84339ea)

v0.5.3

03 Jan 10:47
Compare
Choose a tag to compare

Features

  • Add unit support: pc, cm, mm, in (closes #21) (f8e54a7)
  • Add viewBox support (closes #20) (PR #22)
  • Support real units as rasterizer document sizes (2e10f21)
  • Default to 100% for doc width/height in rasterizer

v0.5.2

13 Dec 17:55
Compare
Choose a tag to compare

Features

All path commands are now supported!

  • Add SVGArcApproximator and support for ArcTo path commands (closes #8) (d14f53c)
  • Add support for S/s, T/t path commands (closes #19) (2e64cfd, ce162b6)

v0.5.1

08 Dec 17:04
Compare
Choose a tag to compare

Features

  • Add support for rgb/rgba colors with percentages (81136fa), as well as hsl and hsla color support (aa48436) (see #11)
  • Add display: none (fd2c893) and visibility (dbcb999) support to node rasterization (see #15)

Fixes

  • Rewrite path command parsing (fixes #17, fixes #18) (2dedb4e)
  • Fix "at least 3 points" error occurring for some paths (96605e8)
  • Use floating-point modulo in HSL color parsing (9d9c064)

Style

  • Update composer.json description (8c9e9d3)

v0.5.0

12 Nov 12:47
Compare
Choose a tag to compare

Features

  • POTENTIALLY BREAKING: Make SVGNodeContainer methods chainable (fixes #9) (98aebf0)
  • Add support for named colors (fixes #12) (0061d65)
  • Add 'transparent' color support (fcae18c)
  • Add support for 'pt' unit (12pt = 16px) (a02b4c1)
  • Add getter & setter for d attribute to SVGPath (cafd2be)

Fixes

  • Fix renderers interpreting percentages as pixels (35ab405)
  • Draw precise outlines in SVGRectRenderer (fixes #7) (1137e78)

Style

  • POTENTIALLY BREAKING: Store node tag names in 'TAG_NAME' constants (69db5a9)
  • Store all special attrs. in SVGNode::attributes (7f33fb1)
  • Abandon setStyle() for default styles (fixes #14) (5a4d720)
  • Improve docs (07f2b95, 8fc3c5d, 1b9515e)

v0.4.2

29 Oct 11:02
Compare
Choose a tag to compare

Fixes

  • Fix relative CurveToCubic wrong in SVGPathApproximator due to typo (a86a84d)

Style

  • Document every class
  • Move container removeChild() "search" into own method (1a99208)
  • Move GD color conversion into SVGRenderer (29952ff)