### Eclipse Workspace Patch 1.0 #P org.eclipse.draw2d Index: src/org/eclipse/draw2d/RelativeBendpoint.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.draw2d/src/org/eclipse/draw2d/RelativeBendpoint.java,v retrieving revision 1.8 diff -u -r1.8 RelativeBendpoint.java --- src/org/eclipse/draw2d/RelativeBendpoint.java 30 Mar 2005 21:27:45 -0000 1.8 +++ src/org/eclipse/draw2d/RelativeBendpoint.java 7 Dec 2007 16:31:19 -0000 @@ -12,6 +12,7 @@ import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.PrecisionPoint; /** * RelativeBendpoint is a Bendpoint that calculates its location based on its distance @@ -58,19 +59,15 @@ * @since 2.0 */ public Point getLocation() { - Point a1 = getConnection().getSourceAnchor().getReferencePoint(); - Point a2 = getConnection().getTargetAnchor().getReferencePoint(); + PrecisionPoint a1 = new PrecisionPoint(getConnection().getSourceAnchor().getReferencePoint()); + PrecisionPoint a2 = new PrecisionPoint(getConnection().getTargetAnchor().getReferencePoint()); - Point p = new Point(); - Dimension dim1 = d1.getCopy(), dim2 = d2.getCopy(); + getConnection().translateToRelative(a1); + getConnection().translateToRelative(a2); - getConnection().translateToAbsolute(dim1); - getConnection().translateToAbsolute(dim2); - - p.x = (int)((a1.x + dim1.width) * (1f - weight) + weight * (a2.x + dim2.width)); - p.y = (int)((a1.y + dim1.height) * (1f - weight) + weight * (a2.y + dim2.height)); - getConnection().translateToRelative(p); - return p; + return new PrecisionPoint((a1.preciseX + d1.width) * (1f - weight) + + weight * (a2.preciseX + d2.width), (a1.preciseY + d1.height) * (1f - weight) + weight + * (a2.preciseY + d2.height)); } /**