Commit 23336d8
Store absolute coordinated for parts in background selection Fixed a bug in the BF font format.
Changed files (2)
Diff
@@ -60,10 +60,10 @@ public class BackgroundSelection : GLib.Object { } } - private double height;- private double width;- private double x_img;- private double y_img;+ public double height;+ public double width;+ public double x_img;+ public double y_img; public BackgroundSelection (BackgroundImage? img, BackgroundImage parent_img, double x, double y, double w, double h) {@@ -76,6 +76,18 @@ public class BackgroundSelection : GLib.Object { this.w = w; this.h = h; }+ + public BackgroundSelection.absolute (BackgroundImage? img, BackgroundImage parent_img,+ double x_img, double y_img, double width, double height) {+ + assigned_glyph = null;+ parent_image = parent_img;+ image = img;+ this.x_img = x_img;+ this.y_img = y_img;+ this.width = width;+ this.height = height;+ } } }@@ -228,10 +228,10 @@ class BirdFontFile : GLib.Object { foreach (BackgroundSelection selection in b.selections) { os.put_string ("\t\t<selection ");- os.put_string (@"x=\"$(selection.x)\" ");- os.put_string (@"y=\"$(selection.y)\" ");- os.put_string (@"width=\"$(selection.w)\" ");- os.put_string (@"height=\"$(selection.h)\" ");+ os.put_string (@"x=\"$(selection.x_img)\" ");+ os.put_string (@"y=\"$(selection.y_img)\" ");+ os.put_string (@"width=\"$(selection.width)\" ");+ os.put_string (@"height=\"$(selection.height)\" "); if (selection.assigned_glyph != null) { glyph_name = (!) selection.assigned_glyph;@@ -990,7 +990,7 @@ class BirdFontFile : GLib.Object { } } - s = new BackgroundSelection (null, image, x, y, w, h);+ s = new BackgroundSelection.absolute (null, image, x, y, w, h); s.assigned_glyph = assigned_glyph; image.selections.add (s);