The Birdfont Source Code


All Repositories / birdfont.git / blobdiff – RSS feed

Fix gradient matrix

Changes made to libsvgbird/Object.vala

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
--- libsvgbird/Object.vala +++ libsvgbird/Object.vala @@ -147,7 +147,7 @@ cr.fill_preserve (); } else { cr.fill (); - } + } } if (style.stroke_gradient != null) { @@ -184,7 +184,13 @@ Matrix gradient_matrix = g.get_matrix (); gradient_matrix.invert (); + Matrix object_matrix = transforms.get_matrix (); + object_matrix.invert (); + gradient_matrix.multiply (gradient_matrix, object_matrix); + pattern.set_matrix (gradient_matrix); + + g.view_matrix = gradient_matrix; foreach (Stop s in g.stops) { Color c = s.color;