Skip to main content



      Home
Home » Eclipse Projects » GEF » Bezier curves
Bezier curves [message #56962] Tue, 21 January 2003 16:29 Go to next message
Eclipse UserFriend
I think I asked this before, but does GEF/Draw2D have support for
drawing Bezier (quadratic) curves, a la java.awt.geom.GeneralPath.curveTo()?

If not, is it planned?

If not, how would I go about creating a figure that represents a series
of points connected by bezier curves?

--
Colin M Sharples/New Zealand/IBM, IT Architect, IBM Global Services
sharples@nz.ibm.com, t: 64-4-5769853, m: 64-21-402085, f: 64-4-5765616
"Sometimes I think the surest sign intelligent life exists
elsewhere in the Universe is that it's never tried to contact us"
Re: Bezier curves [message #58265 is a reply to message #56962] Mon, 27 January 2003 09:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.i_b_m.com

There is no support for this. It is pretty simple to ask awt.geom package
to generate a shape, and then iterate over that awt shape and create a
Draw2D PointList for a Polyline.

In fact, this is how we draw the focus outline on connections. Select an
object that has connections in the logic example and press Ctrl+'/'.


"Colin Sharples" <sharples@nz1.ibm.com> wrote in message
news:b0kd6h$51m$1@rogue.oti.com...
> I think I asked this before, but does GEF/Draw2D have support for
> drawing Bezier (quadratic) curves, a la
java.awt.geom.GeneralPath.curveTo()?
>
> If not, is it planned?
>
> If not, how would I go about creating a figure that represents a series
> of points connected by bezier curves?
>
> --
> Colin M Sharples/New Zealand/IBM, IT Architect, IBM Global Services
> sharples@nz.ibm.com, t: 64-4-5769853, m: 64-21-402085, f: 64-4-5765616
> "Sometimes I think the surest sign intelligent life exists
> elsewhere in the Universe is that it's never tried to contact us"
>
Re: Bezier curves [message #58406 is a reply to message #58265] Mon, 27 January 2003 16:02 Go to previous messageGo to next message
Eclipse UserFriend
Randy Hudson wrote:
> There is no support for this. It is pretty simple to ask awt.geom package
> to generate a shape, and then iterate over that awt shape and create a
> Draw2D PointList for a Polyline.

But that would just draw straight lines between the points, right? How
would I get curved lines? I assume this can't be done because the
underlying SWT graphics object doesn't support curveTo().

--
Colin M Sharples/New Zealand/IBM, IT Architect, IBM Global Services
sharples@nz.ibm.com, t: 64-4-5769853, m: 64-21-402085, f: 64-4-5765616
"Sometimes I think the surest sign intelligent life exists
elsewhere in the Universe is that it's never tried to contact us"
Re: Bezier curves [message #58996 is a reply to message #58406] Tue, 28 January 2003 16:12 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Curved lines are appoximated with polylines. AWT allows you to set a
"flatness" when appoximating a curve with a polyline. The closer to 0.0,
the more segments that will be used to represent hte curve.

"Colin Sharples" <sharples@nz1.ibm.com> wrote in message
news:b145op$lum$1@rogue.oti.com...
> Randy Hudson wrote:
> > There is no support for this. It is pretty simple to ask awt.geom
package
> > to generate a shape, and then iterate over that awt shape and create a
> > Draw2D PointList for a Polyline.
>
> But that would just draw straight lines between the points, right? How
> would I get curved lines? I assume this can't be done because the
> underlying SWT graphics object doesn't support curveTo().
>
> --
> Colin M Sharples/New Zealand/IBM, IT Architect, IBM Global Services
> sharples@nz.ibm.com, t: 64-4-5769853, m: 64-21-402085, f: 64-4-5765616
> "Sometimes I think the surest sign intelligent life exists
> elsewhere in the Universe is that it's never tried to contact us"
>
Previous Topic:Make Label to have several editable parts?
Next Topic:Scroll Bar in logic Editor example
Goto Forum:
  


Current Time: Fri May 23 13:32:43 EDT 2025

Powered by FUDForum. Page generated in 0.03886 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top