This repository has been archived by the owner on Nov 8, 2019. It is now read-only.
Releases: nstdio/SVGMagick
Releases · nstdio/SVGMagick
v0.4.2
Bugfix.
Enhanced SVG Transform API.
Revised basic principles for constructing a transformation string. Now instead of changing the existing transformation, a new transformation is added to the string.
// Before
$transform->translate(10)
->rotate(12.5)
->translate(-5)); // will produce "translate(-5) rotate(12.5)"
// NOW
$transform->translate(10)
->rotate(12.5)
->translate(-5)); // now result is "translate(10) rotate(12.5) translate(-5)"
A new method is added that summarizes successive transformations.
$transform
->translate(10, 25)
->translate(10, 10)
->rotate(5, 10, 10)
->rotate(10, 20, 20)
->compact(); // "translate(20 35) rotate(15 15 15)"
Added a new method that converts all transformations into matrices
$transform
->translate(10, 45)
->rotate(10, 55, 10)
->skewX(20)
->skewY(10)
->toMatrix(); // "matrix(1 0 0 1 10 45) matrix(0.98480775301221 0.17364817766693 -0.17364817766693 0.98480775301221 0 0) matrix(1 0 0.3639702342662 1 0 0) matrix(1 0.17632698070846 0 1 0 0)"
// If you need a more compact string, you can do so
$transform->compact(); // "matrix(1.017391662044 0.35844070857103 0.1847925309041 1.0480105209175 10 45)"
// As you can see, all the matrices are multiplied and as a result
// one single matrix is obtained that reproduces all the necessary transformations.
SVG string import.
v0.3.0 Improve documentation.
Object copy mechanism
v0.2.3 Adding new method to API.
New SVG Transform API.
v0.2.2 Remove unused $matcher property.
Transform API
Adding new API for SVG transform
attribute.
v0.2.0
Adding method to API.
v0.1-alpha.2 Adding getFirstChild method.
v0.1-alpha.1
Save child refs.