Community
Participate
Working Groups
Created attachment 102829 [details] SplineCurveConnection class extending a PolylineConnection The request is to add smooth curves to the list of available connections instead of polylines only. This could be bezier curves or cubic splines. See attached my version of a cubic spline curve connection, which extends a PolylineConnection. It still has room for improvements but already looks quite nice. If interested you can use it.
Created attachment 102832 [details] example image showing the splines
Regarding the patch, I think we should be using either SWT's Path or AWT's geometry package (see StrokePointList) to compute/render the curve. In the attached screenshot you can still see the staight-line segments.
Yeah, that would be nice. I gave it a first try with the drawPath(Path) method, but I got this exception: Exception in thread "Thread-1" java.lang.RuntimeException: The class: class org.eclipse.gmf.runtime.draw2d.ui.render.internal.graphics.RenderedMapModeGraphics has not implemented this new graphics function The GEF newsgroup said: "This is not a exactly GEF issue, the code you are using is in GMF. The exception indicates that this support is not implemented in the ScaledGraphics in GMF. I would raise an enhancement request in Bugzilla.It is not clear to me if the ScaledGraphics in GEF has implemented this feature either." I'm not enough involved to comment on this, sorry. Maybe someone else can?
bug 168307 may have recently addressed that exception you were seeing.
can anyone tell me how to render a curve by using SplineCurveConnection. any help is much appreciated.. Thanks Joseph