Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to make PolylineConnection line look smoother
How to make PolylineConnection line look smoother [message #190329] Wed, 03 August 2005 11:43 Go to next message
Eclipse UserFriend
Originally posted by: erel.unicorn.com

I'm writing a GUI that draws a line between two figures.

the code is:

PolylineConnection conn = new PolylineConnection();
conn.setSourceAnchor(new EllipseAnchor(leftNode));
conn.setTargetAnchor(new EllipseAnchor(rightNode));

when moving the nodes the angle of the line between them is changing and
the line doesn't look smooth when not in %45 degrees.

how can I make the line smooth in any angle


thanks in advance
Re: How to make PolylineConnection line look smoother [message #190369 is a reply to message #190329] Wed, 03 August 2005 17:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

Turn anti-aliasing on. If using GEF, you can use the
ConnectionLayer#setAntialias() method. Otherwise, you can just turn it on
for the GC in the paint() method of one of your figures (root or contents or
other parent figure).

This will enable advanced graphics functionality (provided by SWT), which
could fail if the proper libraries are not available on various platforms.

"Erel" <erel@unicorn.com> wrote in message
news:01242f6b63a2200a1953598a1725376c$1@www.eclipse.org...
>
> I'm writing a GUI that draws a line between two figures.
>
> the code is:
>
> PolylineConnection conn = new PolylineConnection();
> conn.setSourceAnchor(new EllipseAnchor(leftNode));
> conn.setTargetAnchor(new EllipseAnchor(rightNode));
>
> when moving the nodes the angle of the line between them is changing and
> the line doesn't look smooth when not in %45 degrees.
>
> how can I make the line smooth in any angle
>
>
> thanks in advance
>
Re: How to make PolylineConnection line look smoother [message #190497 is a reply to message #190369] Thu, 04 August 2005 09:06 Go to previous message
Eclipse UserFriend
Originally posted by: erel.unicorn.com

thanks very much for the answer.

could you refer me to an example that does somthing similar to drawing
lines between tree nodes of two diferent trees

thanks,
Erel
Previous Topic:Grids in Canvas!!!!
Next Topic:Adding ruler to Canvas!!!
Goto Forum:
  


Current Time: Tue Dec 03 05:46:26 GMT 2024

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

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

Back to the top