1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/test_svg_matrix_rotation.py Sat Aug 30 00:51:04 2008 +0200
1.3 @@ -0,0 +1,19 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +import libxml2dom.svg
1.7 +
1.8 +# NOTE: Need to incorporate unit conversion.
1.9 +
1.10 +xscale, yscale = 3.75, 3.75
1.11 +
1.12 +d = libxml2dom.svg.parse("tests/test_svg.xml")
1.13 +svg = d.documentElement
1.14 +path = svg.xpath(".//svg:path")[0]
1.15 +m = svg.createSVGMatrixComponents(1, 0, 0, 1, 0, 0)
1.16 +m.mTranslate(-20 * xscale, -30 * yscale)
1.17 +m.mRotate(60)
1.18 +m.mTranslate(20 * xscale, 30 * yscale)
1.19 +path.setMatrixTrait("transform", m)
1.20 +d.toFile(open("tmp_test.svg", "wb"))
1.21 +
1.22 +# vim: tabstop=4 expandtab shiftwidth=4