The Birdfont Source Code


All Repositories / birdfont.git / commit – 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
author Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 02 Oct 2016 13:04:19 +0000 (15:04 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 02 Oct 2016 13:04:19 +0000 (15:04 +0200)
commit 25e177c76c41b34730539202917992569600dd3a
tree 798c91cb3a309d769f549a255f89d9656b9d778a
parent 9ddcb091d91719d0b70dd0b6910a40a33d8a0807
Fix gradient matrix

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;