The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Rename FastPath to PathObject

These changes was commited to the Birdfont repository Wed, 06 Jan 2016 15:06:56 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Wed, 06 Jan 2016 15:06:56 +0000]

Updated Files

libbirdfont/DrawingTools.vala
libbirdfont/ExportTool.vala
libbirdfont/FastPath.vala
libbirdfont/Glyph.vala
libbirdfont/Layer.vala
libbirdfont/MoveTool.vala
libbirdfont/OrientationTool.vala
libbirdfont/PathObject.vala
libbirdfont/PenTool.vala
libbirdfont/ResizeTool.vala
libbirdfont/StrokeTool.vala
libbirdfont/Svg/SvgParser.vala
libbirdfont/TrackTool.vala
--- a/libbirdfont/DrawingTools.vala +++ b/libbirdfont/DrawingTools.vala @@ -846,8 +846,8 @@ foreach (Object p in g.active_paths) { p.stroke = StrokeTool.stroke_width; - if (p is FastPath) { - Path path = ((FastPath) p).get_path (); + if (p is PathObject) { + Path path = ((PathObject) p).get_path (); path.reset_stroke (); } } @@ -888,8 +888,8 @@ foreach (Object p in g.active_paths) { p.line_cap = LineCap.BUTT; - if (p is FastPath) { - ((FastPath) p).get_path ().reset_stroke (); + if (p is PathObject) { + ((PathObject) p).get_path ().reset_stroke (); } } @@ -915,8 +915,8 @@ foreach (Object p in g.active_paths) { p.line_cap = LineCap.ROUND; - if (p is FastPath) { - ((FastPath) p).get_path ().reset_stroke (); + if (p is PathObject) { + ((PathObject) p).get_path ().reset_stroke (); } } @@ -943,8 +943,8 @@ foreach (Object p in g.active_paths) { p.line_cap = LineCap.SQUARE; - if (p is FastPath) { - ((FastPath) p).get_path ().reset_stroke (); + if (p is PathObject) { + ((PathObject) p).get_path ().reset_stroke (); } }
--- a/libbirdfont/ExportTool.vala +++ b/libbirdfont/ExportTool.vala @@ -104,8 +104,8 @@ foreach (Object o in pl) { - if (o is FastPath) { - Path p = ((FastPath) o).get_path (); + if (o is PathObject) { + Path p = ((PathObject) o).get_path (); if (p.stroke > 0) { s.append (@"<path "); @@ -132,8 +132,8 @@ if (only_selected_paths) { foreach (Object p in glyph.active_paths) { - if (p is FastPath) { - Path path = ((FastPath) p).get_path (); + if (p is PathObject) { + Path path = ((PathObject) p).get_path (); if (path.stroke == 0) { glyph_svg += Svg.to_svg_path (path, glyph); }
diff --git libbirdfont/FastPath.vala(deleted)
--- a/libbirdfont/FastPath.vala +++ /dev/null @@ -1,238 +1,1 @@ - /* - Copyright (C) 2015 Johan Mattsson - - This library is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 3 of the - License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - */ - - using Cairo; - - namespace BirdFont { - - public class FastPath : Object { - - Path path; - - public override double stroke { - get { - return path.stroke; - } - - set { - path.stroke = value; - } - } - - public override double rotation { - get { - return path.rotation; - } - - set { - path.rotation = value; - } - } - - public override LineCap line_cap { - get { - return path.line_cap; - } - - set { - path.line_cap = value; - } - } - - public override bool fill { - get { - return path.fill; - } - - set { - path.fill = value; - } - } - - public override Color? color { - get { - return path.color; - } - - set { - path.color = value; - } - } - - public override Color? stroke_color { - get { - return path.stroke_color; - } - - set { - path.stroke_color = value; - } - } - - public override Gradient? gradient { - get { - return path.gradient; - } - - set { - path.gradient = value; - } - } - - public override double xmin { - get { - return path.xmin; - } - - set { - path.xmin = value; - } - - default = Glyph.CANVAS_MAX; - } - - public override double xmax { - get { - return path.xmax; - } - - set { - path.xmax = value; - } - - default = Glyph.CANVAS_MIN; - } - - public override double ymin { - get { - return path.ymin; - } - - set { - path.ymin = value; - } - - default = Glyph.CANVAS_MAX; - } - - public override double ymax { - get { - return path.ymax; - } - - set { - path.ymax = value; - } - - default = Glyph.CANVAS_MIN; - } - - public FastPath () { - path = new Path (); - update_region_boundaries (); - } - - public FastPath.create_copy (FastPath p) { - base.create_copy (p); - path = p.path.copy (); - } - - public FastPath.for_path (Path path) { - this.path = path; - } - - public override bool is_over (double x, double y) { - return path.is_over (x, y); - } - - public override void draw (Context cr, Color? c = null) { - PathList path_stroke; - Color path_color; - bool open; - - cr.save (); - - if (c != null) { - path_color = (!) c; - } else if (color != null) { - path_color = (!) color; - } else { - path_color = Color.black (); - } - - if (path.stroke > 0) { - path_stroke = path.get_stroke_fast (); - draw_path_list (path_stroke, cr, path_color); - } else { - open = path.is_open (); - - if (open) { - path.close (); - path.recalculate_linear_handles (); - } - - path.draw_path (cr, path_color); - - if (open) { - path.reopen (); - } - } - - cr.restore (); - } - - public static void draw_path_list (PathList pl, Context cr, Color? c = null) { - foreach (Path p in pl.paths) { - p.draw_path (cr, c); - } - } - - public override void move (double dx, double dy) { - path.move (dx, dy); - path.reset_stroke (); - } - - public Path get_path () { - return path; - } - - public override void update_region_boundaries () { - path.update_region_boundaries (); - } - - public override void rotate (double theta, double xc, double yc) { - path.rotate (theta, xc, yc); - } - - public override bool is_empty () { - return path.points.size == 0; - } - - public override void resize (double ratio_x, double ratio_y) { - path.resize (ratio_x, ratio_y); - path.reset_stroke (); - } - - public override Object copy () { - return new FastPath.create_copy (this); - } - - public override string to_string () { - return "FastPath"; - } - - } - - }
--- a/libbirdfont/Glyph.vala +++ b/libbirdfont/Glyph.vala @@ -303,7 +303,7 @@ public void add_active_path (Layer? group, Path? p) { if (p != null) { - FastPath path = new FastPath.for_path ((!) p); + PathObject path = new PathObject.for_path ((!) p); add_active_object (group, path); } else { add_active_object (group, null); @@ -321,8 +321,8 @@ active_paths.add (object); } - if (object is FastPath) { - FastPath path = (FastPath) object; + if (object is PathObject) { + PathObject path = (PathObject) object; if (Toolbox.get_move_tool ().is_selected ()) { if (path.get_path ().stroke > 0) { Toolbox.set_object_stroke (path.get_path ().stroke); @@ -348,12 +348,12 @@ return true; } - if (object is FastPath) { - FastPath path = (FastPath) object; + if (object is PathObject) { + PathObject path = (PathObject) object; foreach (Object active in glyph.active_paths) { - if (active is FastPath) { - FastPath path_active = (FastPath) active; + if (active is PathObject) { + PathObject path_active = (PathObject) active; if (path_active.get_path () == path.get_path ()) { return true; } @@ -983,7 +983,7 @@ path.reopen (); path.create_list (); - FastPath object = new FastPath.for_path (path); + PathObject object = new PathObject.for_path (path); add_active_object (null, object); } @@ -1097,7 +1097,7 @@ public void set_active_path (Path p) { p.reopen (); clear_active_paths (); - add_active_object (null, new FastPath.for_path (p)); + add_active_object (null, new PathObject.for_path (p)); } /** Move view port centrum to this coordinate. */ @@ -1408,7 +1408,7 @@ foreach (Object object in active_paths) { EditPoint p; - Path path = ((FastPath) object).get_path (); + Path path = ((PathObject) object).get_path (); EditPoint pl = path.get_last_point (); if (pl.prev != null) { @@ -1737,7 +1737,7 @@ color = Color.black (); } - FastPath.draw_path_list (stroke, cr, color); + PathObject.draw_path_list (stroke, cr, color); } } cr.fill (); @@ -1750,12 +1750,12 @@ cr.save (); cr.new_path (); foreach (Object o in active_paths) { - if (o is FastPath) { - Path p = ((FastPath) o).get_path (); + if (o is PathObject) { + Path p = ((PathObject) o).get_path (); if (p.stroke > 0) { stroke = p.get_stroke_fast (); color = Theme.get_color ("Selected Objects"); - FastPath.draw_path_list (stroke, cr, color); + PathObject.draw_path_list (stroke, cr, color); } } } @@ -1797,8 +1797,8 @@ foreach (Object o in get_visible_objects ()) { print("visible obj\n"); - if (o is FastPath) { - Path p = ((FastPath) o).get_path (); + if (o is PathObject) { + Path p = ((PathObject) o).get_path (); if (p.stroke == 0) { color = p.color == null ? Color.black () : (!) p.color; @@ -1813,8 +1813,8 @@ cr.restore (); foreach (Object o in active_paths) { - if (o is FastPath) { - Path p = ((FastPath) o).get_path (); + if (o is PathObject) { + Path p = ((PathObject) o).get_path (); cr.save (); cr.new_path (); if (p.stroke == 0) { @@ -2590,8 +2590,8 @@ Gee.ArrayList<Path> paths = new Gee.ArrayList<Path> (); foreach (Object object in active_paths) { - if (object is FastPath) { - paths.add (((FastPath) object).get_path ()); + if (object is PathObject) { + paths.add (((PathObject) object).get_path ()); } }
--- a/libbirdfont/Layer.vala +++ b/libbirdfont/Layer.vala @@ -53,8 +53,8 @@ PathList paths = new PathList (); foreach (Object o in objects) { - if (o is FastPath) { - FastPath p = (FastPath) o; + if (o is PathObject) { + PathObject p = (PathObject) o; paths.add (p.get_path ()); } } @@ -89,8 +89,8 @@ if (visible) { foreach (Object o in objects) { - if (o is FastPath) { - FastPath p = (FastPath) o; + if (o is PathObject) { + PathObject p = (PathObject) o; paths.add (p.get_path ()); } } @@ -110,7 +110,7 @@ } public void add_path (Path path) { - FastPath p = new FastPath.for_path (path); + PathObject p = new PathObject.for_path (path); objects.add (p); } @@ -124,10 +124,10 @@ } } - private FastPath? get_fast_path (Path path) { + private PathObject? get_fast_path (Path path) { foreach (Object o in objects) { - if (o is FastPath) { - FastPath p = (FastPath) o; + if (o is PathObject) { + PathObject p = (PathObject) o; if (p.get_path () == path) { return p; } @@ -138,7 +138,7 @@ } public void remove_path (Path path) { - FastPath? p = get_fast_path (path); + PathObject? p = get_fast_path (path); if (p != null) { objects.remove ((!) p); @@ -252,8 +252,8 @@ PathList paths = new PathList (); foreach (Object object in objects) { - if (object is FastPath) { - paths.add (((FastPath) object).get_path ()); + if (object is PathObject) { + paths.add (((PathObject) object).get_path ()); } }
--- a/libbirdfont/MoveTool.vala +++ b/libbirdfont/MoveTool.vala @@ -95,8 +95,8 @@ } foreach (Object p in g.active_paths) { - if (p is FastPath) { - g.layers.remove_path (((FastPath) p).get_path ()); + if (p is PathObject) { + g.layers.remove_path (((PathObject) p).get_path ()); } else { g.layers.remove (p); } @@ -189,8 +189,8 @@ DrawingTools.resize_tool.signal_objects_rotated (); foreach (Object o in glyph.active_paths) { - if (o is FastPath) { - FastPath path = (FastPath) o; + if (o is PathObject) { + PathObject path = (PathObject) o; path.get_path ().create_full_stroke (); } } @@ -324,8 +324,8 @@ py2 = -10000; foreach (Object o in glyph.active_paths) { - if (o is FastPath) { - Path p = ((FastPath) o).get_path (); + if (o is PathObject) { + Path p = ((PathObject) o).get_path (); p.update_region_boundaries (); if (px > p.xmin) { @@ -457,8 +457,8 @@ public static void update_boundaries_for_selection () { Glyph glyph = MainWindow.get_current_glyph (); foreach (Object o in glyph.active_paths) { - if (o is FastPath) { - ((FastPath)o).get_path ().update_region_boundaries (); + if (o is PathObject) { + ((PathObject)o).get_path ().update_region_boundaries (); } } } @@ -482,8 +482,8 @@ yc = selection_box_center_y; foreach (Object p in glyph.active_paths) { - if (p is FastPath) { - Path path = ((FastPath) p).get_path (); + if (p is PathObject) { + Path path = ((PathObject) p).get_path (); // FIXME: move to object if (vertical) {
--- a/libbirdfont/OrientationTool.vala +++ b/libbirdfont/OrientationTool.vala @@ -31,8 +31,8 @@ Glyph g = MainWindow.get_current_glyph (); foreach (Object o in g.active_paths) { - if (o is FastPath) { - FastPath p = (FastPath) o; + if (o is PathObject) { + PathObject p = (PathObject) o; p.get_path ().reverse (); } } @@ -58,8 +58,8 @@ bool has_counter_clockwise_paths = false; foreach (Object o in glyph.active_paths) { - if (o is FastPath) { - Path p = ((FastPath) o).get_path (); + if (o is PathObject) { + Path p = ((PathObject) o).get_path (); if (p.is_clockwise ()) { has_clockwise_paths = true;
diff --git libbirdfont/PathObject.vala(new)
--- /dev/null +++ b/libbirdfont/PathObject.vala @@ -1,1 +1,238 @@ + /* + Copyright (C) 2015 Johan Mattsson + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + */ + + using Cairo; + + namespace BirdFont { + + public class PathObject : Object { + + Path path; + + public override double stroke { + get { + return path.stroke; + } + + set { + path.stroke = value; + } + } + + public override double rotation { + get { + return path.rotation; + } + + set { + path.rotation = value; + } + } + + public override LineCap line_cap { + get { + return path.line_cap; + } + + set { + path.line_cap = value; + } + } + + public override bool fill { + get { + return path.fill; + } + + set { + path.fill = value; + } + } + + public override Color? color { + get { + return path.color; + } + + set { + path.color = value; + } + } + + public override Color? stroke_color { + get { + return path.stroke_color; + } + + set { + path.stroke_color = value; + } + } + + public override Gradient? gradient { + get { + return path.gradient; + } + + set { + path.gradient = value; + } + } + + public override double xmin { + get { + return path.xmin; + } + + set { + path.xmin = value; + } + + default = Glyph.CANVAS_MAX; + } + + public override double xmax { + get { + return path.xmax; + } + + set { + path.xmax = value; + } + + default = Glyph.CANVAS_MIN; + } + + public override double ymin { + get { + return path.ymin; + } + + set { + path.ymin = value; + } + + default = Glyph.CANVAS_MAX; + } + + public override double ymax { + get { + return path.ymax; + } + + set { + path.ymax = value; + } + + default = Glyph.CANVAS_MIN; + } + + public PathObject () { + path = new Path (); + update_region_boundaries (); + } + + public PathObject.create_copy (PathObject p) { + base.create_copy (p); + path = p.path.copy (); + } + + public PathObject.for_path (Path path) { + this.path = path; + } + + public override bool is_over (double x, double y) { + return path.is_over (x, y); + } + + public override void draw (Context cr, Color? c = null) { + PathList path_stroke; + Color path_color; + bool open; + + cr.save (); + + if (c != null) { + path_color = (!) c; + } else if (color != null) { + path_color = (!) color; + } else { + path_color = Color.black (); + } + + if (path.stroke > 0) { + path_stroke = path.get_stroke_fast (); + draw_path_list (path_stroke, cr, path_color); + } else { + open = path.is_open (); + + if (open) { + path.close (); + path.recalculate_linear_handles (); + } + + path.draw_path (cr, path_color); + + if (open) { + path.reopen (); + } + } + + cr.restore (); + } + + public static void draw_path_list (PathList pl, Context cr, Color? c = null) { + foreach (Path p in pl.paths) { + p.draw_path (cr, c); + } + } + + public override void move (double dx, double dy) { + path.move (dx, dy); + path.reset_stroke (); + } + + public Path get_path () { + return path; + } + + public override void update_region_boundaries () { + path.update_region_boundaries (); + } + + public override void rotate (double theta, double xc, double yc) { + path.rotate (theta, xc, yc); + } + + public override bool is_empty () { + return path.points.size == 0; + } + + public override void resize (double ratio_x, double ratio_y) { + path.resize (ratio_x, ratio_y); + path.reset_stroke (); + } + + public override Object copy () { + return new PathObject.create_copy (this); + } + + public override string to_string () { + return "PathObject"; + } + + } + + }
--- a/libbirdfont/PenTool.vala +++ b/libbirdfont/PenTool.vala @@ -766,8 +766,8 @@ } foreach (Object path in g.active_paths) { - if (path is FastPath) { - FastPath p = (FastPath) path; + if (path is PathObject) { + PathObject p = (PathObject) path; p.get_path ().reset_stroke (); } } @@ -1059,8 +1059,8 @@ // don't use set point to reflective to on open ends reflective = true; foreach (Object path in MainWindow.get_current_glyph ().active_paths) { - if (path.is_open () && !path.is_empty () && path is FastPath) { - Path p = ((FastPath) path).get_path (); + if (path.is_open () && !path.is_empty () && path is PathObject) { + Path p = ((PathObject) path).get_path (); if (selected_handle.parent == p.get_first_point () || selected_handle.parent == p.get_last_point ()) { reflective = false; @@ -1234,7 +1234,7 @@ if (active_edit_point != null) { glyph.clear_active_paths (); - FastPath path = new FastPath.for_path (active_path); + PathObject path = new PathObject.for_path (active_path); glyph.add_active_object (null, path); DrawingTools.update_stroke_settings (); @@ -1415,7 +1415,7 @@ foreach (Path merge in paths) { if (merge.points.size > 0) { - FastPath merged_path = new FastPath.for_path (merge); + PathObject merged_path = new PathObject.for_path (merge); if (is_close_to_point (merge.points.get (merge.points.size - 1), px, py)) { glyph.add_active_object (null, merged_path); @@ -1463,7 +1463,7 @@ glyph.clear_active_paths (); - FastPath closed_path = new FastPath.for_path (path); + PathObject closed_path = new PathObject.for_path (path); glyph.add_active_object (null, closed_path); if (direction_changed) { @@ -1503,7 +1503,7 @@ } else { union = merge_open_paths (path, merge); - FastPath union_path = new FastPath.for_path (union); + PathObject union_path = new PathObject.for_path (union); glyph.add_path (union); glyph.delete_path (path); glyph.delete_path (merge); @@ -1791,8 +1791,8 @@ return_val_if_fail (glyph.active_paths.size > 0, new PointSelection.empty ()); Object object = glyph.active_paths.get (glyph.active_paths.size - 1); - if (object is FastPath) { - Path path = ((FastPath) object).get_path (); + if (object is PathObject) { + Path path = ((PathObject) object).get_path (); add_selected_point (selected_point, path); @@ -1837,7 +1837,7 @@ EditPoint inserted; bool stroke = StrokeTool.add_stroke; Glyph g = MainWindow.get_current_glyph (); - FastPath path; + PathObject path; if (g.active_paths.size == 0) { np = new Path (); @@ -1845,7 +1845,7 @@ np.stroke = stroke ? StrokeTool.stroke_width : 0; np.line_cap = StrokeTool.line_cap; - path = new FastPath.for_path (np); + path = new PathObject.for_path (np); g.add_active_object (null, path); active_path = np; @@ -1872,7 +1872,7 @@ } g.clear_active_paths (); - path = new FastPath.for_path (np); + path = new PathObject.for_path (np); g.add_active_object (null, path); active_path = np; selected_path = np; @@ -2083,7 +2083,7 @@ selected_handle.selected = true; active_path = p.path; - FastPath path = new FastPath.for_path (active_path); + PathObject path = new PathObject.for_path (active_path); g.add_active_object (null, path); }
--- a/libbirdfont/ResizeTool.vala +++ b/libbirdfont/ResizeTool.vala @@ -122,8 +122,8 @@ GlyphCanvas.redraw (); foreach (Object p in MainWindow.get_current_glyph ().active_paths) { - if (p is FastPath) { - FastPath path = (FastPath) p; + if (p is PathObject) { + PathObject path = (PathObject) p; path.get_path ().create_full_stroke (); } } @@ -546,8 +546,8 @@ glyph.selection_boundaries (out x, out y, out w, out h); foreach (Object path in glyph.active_paths) { - if (path is FastPath) { // FIXME: other objects - Path p = ((FastPath) path).get_path (); + if (path is PathObject) { // FIXME: other objects + Path p = ((PathObject) path).get_path (); SvgParser.apply_matrix (p, 1, 0, s, 1, 0, 0); p.skew = skew; path.update_region_boundaries ();
--- a/libbirdfont/StrokeTool.vala +++ b/libbirdfont/StrokeTool.vala @@ -52,8 +52,8 @@ g.store_undo_state (); foreach (Object o in g.active_paths) { - if (o is FastPath) { - FastPath path = (FastPath) o; + if (o is PathObject) { + PathObject path = (PathObject) o; Path p = path.get_path (); if (p.stroke > 0) { @@ -71,7 +71,7 @@ foreach (Path np in paths.paths) { g.add_path (np); - g.active_paths.add (new FastPath.for_path (np)); + g.active_paths.add (new PathObject.for_path (np)); } PenTool.update_orientation (); @@ -140,8 +140,8 @@ g.store_undo_state (); foreach (Object object in g.active_paths) { - if (object is FastPath) { - Path p = ((FastPath) object).get_path (); + if (object is PathObject) { + Path p = ((PathObject) object).get_path (); if (p.stroke == 0) { o.add (p); @@ -235,7 +235,7 @@ remove_merged_curve_parts (new_paths); foreach (Path p in new_paths.paths) { - FastPath path = new FastPath.for_path (p); + PathObject path = new PathObject.for_path (p); g.add_object (path); g.add_active_object (null, path); }
--- a/libbirdfont/Svg/SvgParser.vala +++ b/libbirdfont/Svg/SvgParser.vala @@ -151,7 +151,7 @@ glyph = MainWindow.get_current_glyph (); foreach (Path p in path_list.paths) { - FastPath path = new FastPath.for_path (p); + PathObject path = new PathObject.for_path (p); glyph.add_object (path); glyph.add_active_object (null, path); // FIXME: groups path.update_region_boundaries (); @@ -294,8 +294,8 @@ PathList path_list = new PathList (); foreach (Object o in layer.objects) { - if (o is FastPath) { - path_list.add (((FastPath) o).get_path ()); + if (o is PathObject) { + path_list.add (((PathObject) o).get_path ()); } } @@ -872,13 +872,13 @@ int inside_count; bool inside; foreach (Object o1 in layer.objects) { - if (o1 is FastPath) { - Path p1 = ((FastPath) o1).get_path (); + if (o1 is PathObject) { + Path p1 = ((PathObject) o1).get_path (); inside_count = 0; foreach (Object o2 in layer.objects) { - if (o2 is FastPath) { - Path p2 = ((FastPath) o2).get_path (); + if (o2 is PathObject) { + Path p2 = ((PathObject) o2).get_path (); if (p1 != p2) { inside = true;
--- a/libbirdfont/TrackTool.vala +++ b/libbirdfont/TrackTool.vala @@ -122,9 +122,9 @@ drawing = true; foreach (Object path in glyph.active_paths) { - if (path is FastPath) { + if (path is PathObject) { // cache merged stroke parts - ((FastPath) path).get_path ().create_full_stroke (); + ((PathObject) path).get_path ().create_full_stroke (); } } } @@ -150,7 +150,7 @@ if (g.active_paths.size > 0) { // set type for last point Object o = g.active_paths.get (g.active_paths.size - 1); - p = ((FastPath) o).get_path (); + p = ((PathObject) o).get_path (); if (p.points.size > 1) { previous = p.points.get (p.points.size - 1); @@ -169,8 +169,8 @@ } foreach (Object path in g.active_paths) { - if (path is FastPath) { - convert_hidden_points (((FastPath) path).get_path ()); + if (path is PathObject) { + convert_hidden_points (((PathObject) path).get_path ()); } } @@ -411,12 +411,12 @@ Object o = glyph.active_paths.get (glyph.active_paths.size - 1); - if (unlikely (!(o is FastPath))) { + if (unlikely (!(o is PathObject))) { warning ("Object is not a path"); return; } - p = ((FastPath) o).get_path (); + p = ((PathObject) o).get_path (); p.reopen (); px = Glyph.path_coordinate_x (x); py = Glyph.path_coordinate_y (y); @@ -504,8 +504,8 @@ Object o = glyph.active_paths.get (glyph.active_paths.size - 1); - if (likely (o is FastPath)) { - return ((FastPath) o).get_path (); + if (likely (o is PathObject)) { + return ((PathObject) o).get_path (); } warning ("Active object is a path.");