The Birdfont Source Code


All Repositories / birdfont.git / blobdiff – RSS feed

Cut off corners on strokes

Changes made to libbirdfont/Path.vala

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
--- libbirdfont/Path.vala +++ libbirdfont/Path.vala @@ -710,6 +710,10 @@ public static double distance (double ax, double bx, double ay, double by) { return Math.fabs (Math.sqrt (Math.pow (ax - bx, 2) + Math.pow (ay - by, 2))); + } + + public static double distance_to_point (EditPoint a, EditPoint b) { + return distance (a.x, b.x, a.y, b.y); } public static double distance_pixels (double x1, double y1, double x2, double y2) {