]> gitweb.michael.orlitzky.com - libsvgtiny.git/commitdiff
Scale stroke-width correctly.
authorJames Bursa <james@netsurf-browser.org>
Sun, 3 Feb 2008 21:50:32 +0000 (21:50 -0000)
committerJames Bursa <james@netsurf-browser.org>
Sun, 3 Feb 2008 21:50:32 +0000 (21:50 -0000)
svn path=/trunk/libsvgtiny/; revision=3841

svgtiny.c
svgtiny_test.c

index ad2e8a5849577b839f78b6594ccf4aa7f5f948b8..2847af4f84c4d8222f3dfff8e50424e52eec6738 100644 (file)
--- a/svgtiny.c
+++ b/svgtiny.c
@@ -1033,7 +1033,8 @@ struct svgtiny_shape *svgtiny_add_shape(struct svgtiny_parse_state *state)
        shape->text = 0;
        shape->fill = state->fill;
        shape->stroke = state->stroke;
-       shape->stroke_width = state->stroke_width;
+       shape->stroke_width = state->stroke_width *
+                       (state->ctm.a + state->ctm.d) / 2;
 
        return shape;
 }
index 8d485d31a1e885c47aa6d478f06e823397425faf..34149b9e1120df08169be255210da811811b9633 100644 (file)
@@ -80,6 +80,7 @@ int main(int argc, char *argv[])
                        printf("stroke none ");
                else
                        printf("stroke #%.6x ", diagram->shape[i].stroke);
+               printf("stroke-width %i ", diagram->shape[i].stroke_width);
                if (diagram->shape[i].path) {
                        printf("path '");
                        for (unsigned int j = 0;