The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Fix gradient matrix

These changes was commited to the Birdfont repository Sun, 02 Oct 2016 13:04:19 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Sun, 02 Oct 2016 13:04:19 +0000]

Updated Files

libsvgbird/Object.vala
--- a/libsvgbird/Object.vala +++ b/libsvgbird/Object.vala @@ -99,7 +99,7 @@ } public Object.create_copy (Object o) { - } + } public virtual bool is_over (double x, double y) { return left <= x <= right && top <= y <= bottom; @@ -151,16 +151,6 @@ right += dx; top += dy; bottom += dy; - - if (style.fill_gradient != null) { - g = (!) style.fill_gradient; - g.move (dx, dy); - } - - if (style.stroke_gradient != null) { - g = (!) style.stroke_gradient; - g.move (dx, dy); - } to_object_distance (ref dx, ref dy); transforms.translate (dx, dy); @@ -269,10 +259,7 @@ 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.parent_matrix = view_matrix;