Clone in a terminal:
Commit 7362b71
Johan Mattsson - 2015-11-15T12:44:44+00:00
7362b713ed3173fd18594f9fc536b0225d43da73johan.mattsson.m@gmail.com

Prettier flags

Changed files (2)

Diff

diff --git a/libbirdfont/EditPoint.vala b/libbirdfont/EditPoint.valaindex 5e905ba..169daf6 100644--- a/libbirdfont/EditPoint.vala+++ b/libbirdfont/EditPoint.vala@@ -59,8 +59,6 @@ public class EditPoint : GLib.Object { 	public static const uint SELF_INTERSECTION = 1 << 16; 	public static const uint COPIED_SELF_INTERSECTION = 1 << 17; 	-	public static const uint ALL = 0xFFFFFF;-	 	public uint flags = NONE; 	 	public bool active_point {@@ -72,7 +70,7 @@ public class EditPoint : GLib.Object { 			if (value) { 				flags |= ACTIVE; 			} else {-				flags &= uint.MAX ^ ACTIVE;+				flags &= ~ACTIVE; 			} 		}	 	}@@ -86,7 +84,7 @@ public class EditPoint : GLib.Object { 			if (value) { 				flags |= SELECTED; 			} else {-				flags &= uint.MAX ^ SELECTED;+				flags &= ~SELECTED; 			} 		}	 	}@@ -100,7 +98,7 @@ public class EditPoint : GLib.Object { 			if (value) { 				flags |= DELETED_POINT; 			} else {-				flags &= uint.MAX ^ DELETED_POINT;+				flags &= ~DELETED_POINT; 			} 		}	 	}@@ -114,7 +112,7 @@ public class EditPoint : GLib.Object { 			if (value) { 				flags |= TIE; 			} else {-				flags &= uint.MAX ^ TIE;+				flags &= ~TIE; 			} 		}	 	}@@ -128,7 +126,7 @@ public class EditPoint : GLib.Object { 			if (value) { 				flags |= REFLECTIVE; 			} else {-				flags &= uint.MAX ^ REFLECTIVE;+				flags &= ~REFLECTIVE; 			} 		}	 	}diff --git a/libbirdfont/StrokeTool.vala b/libbirdfont/StrokeTool.valaindex 5e53bbb..9fa98e8 100644--- a/libbirdfont/StrokeTool.vala+++ b/libbirdfont/StrokeTool.vala@@ -470,7 +470,7 @@ public class StrokeTool : GLib.Object {  		foreach (Path p in o.paths) { 			foreach (EditPoint ep in p.points) {-				ep.flags &= uint.MAX ^ EditPoint.COPIED;+				ep.flags &= ~EditPoint.COPIED; 			} 		} 		@@ -584,7 +584,7 @@ public class StrokeTool : GLib.Object {  		// reset copied points 		foreach (EditPoint n in path.points) {-			n.flags &= uint.MAX ^ EditPoint.COPIED;+			n.flags &= ~EditPoint.COPIED; 		} 				 		// build list of intersection points@@ -631,7 +631,7 @@ public class StrokeTool : GLib.Object { 		 		// reset copy flag 		foreach (EditPoint n in path.points) {-			n.flags &= uint.MAX ^ EditPoint.COPIED;+			n.flags &= ~EditPoint.COPIED; 		} 		 		if (intersections.points.size == 0) {@@ -695,7 +695,7 @@ public class StrokeTool : GLib.Object { 					parts.add (merged); 						 					foreach (EditPoint n in merged.points) {-						n.flags &= uint.MAX ^ EditPoint.SELF_INTERSECTION;+						n.flags &= ~EditPoint.SELF_INTERSECTION; 					} 					 					merged.reverse ();@@ -748,7 +748,7 @@ public class StrokeTool : GLib.Object {  		// reset copied points 		foreach (EditPoint n in path2.points) {-			n.flags &= uint.MAX ^ EditPoint.COPIED;+			n.flags &= ~EditPoint.COPIED; 		} 						 		// build list of intersection points@@ -790,11 +790,11 @@ public class StrokeTool : GLib.Object { 		 		// reset copy flag 		foreach (EditPoint n in path1.points) {-			n.flags &= uint.MAX ^ EditPoint.COPIED;+			n.flags &= ~EditPoint.COPIED; 		} 		 		foreach (EditPoint n in path2.points) {-			n.flags &= uint.MAX ^ EditPoint.COPIED;+			n.flags &= ~EditPoint.COPIED; 		} 		 		if (intersections.points.size == 0) {@@ -966,7 +966,7 @@ public class StrokeTool : GLib.Object { 		 		bool has_curve_start = true; 		foreach (EditPoint e in p.points) {-			e.flags &= uint.MAX ^ EditPoint.NEW_CORNER;+			e.flags &= ~EditPoint.NEW_CORNER; 			 			if ((e.flags & EditPoint.CURVE) == 0) { 				p.set_new_start (e);@@ -2027,9 +2027,9 @@ public class StrokeTool : GLib.Object {  	void reset_intersections (Path p) { 		foreach (EditPoint ep in p.points) {-			ep.flags &= uint.MAX ^ EditPoint.INTERSECTION;-			ep.flags &= uint.MAX ^ EditPoint.COPIED;-			ep.flags &= uint.MAX ^ EditPoint.SELF_INTERSECTION;+			ep.flags &= ~EditPoint.INTERSECTION;+			ep.flags &= ~EditPoint.COPIED;+			ep.flags &= ~EditPoint.SELF_INTERSECTION; 			ep.deleted = false; 		} 		p.remove_points_on_points ();

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112