double ctrl[] = edge.getControlPoints();
Point2 p0 = new Point2(edge.from.getX(), edge.from.getY());
Point2 p1 = new Point2(ctrl[0], ctrl[1]);
Point2 p2 = new Point2(ctrl[1], ctrl[2]);
Point2 p3 = new Point2(edge.to.getX(), edge.to.getY());
Vector2 perp = CubicCurve.perpendicular(p0, p1, p2, p3,
sprite.getX());
double y = metrics.lengthToGu(sprite.getY(), sprite.getUnits());
perp.normalize();
perp.scalarMult(y);
pos.x = CubicCurve.eval(p0.x, p1.x, p2.x, p3.x, sprite.getX())
- perp.data[0];
pos.y = CubicCurve.eval(p0.y, p1.y, p2.y, p3.y, sprite.getX())
- perp.data[1];