Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Moving Anchor
Moving Anchor [message #222370] Thu, 31 August 2006 09:56 Go to next message
Sébastien Gérard is currently offline Sébastien GérardFriend
Messages: 121
Registered: July 2009
Senior Member
Hi,

I would like to be abble to move anchor point all along the border of a
figure ( arectangle in my case).

Any idea to do that?

thanks for your incoming help.

cheers,
Sebastien.
Re: Moving Anchor [message #222377 is a reply to message #222370] Thu, 31 August 2006 12:54 Go to previous message
Eclipse UserFriend
Originally posted by: tobias.brueggendick.prostep.com

Hello Sebastian,

i think you mean a rectangle. For Rectangle(ChopboxAnchor) and a
Ellipse(EllipseAnchor) this is implemented. Look at this classes and try
to understand. It is difficult cause you must use mathematical formulas.
I'd a similiar Problem and at least i don't use all Points of a Figure but
some i can easily calculate.
I'll try to write what i know and i hope you understand my Englisch. In an
Anchor you get a ReferencePoint which is the startPoint of the incoming
Anchor or the end Point. A Second Point is the Center of the Figure your
Anchor is for. It is easily to calculate the center of any figure. With
getbounds you get x,y, width(w) and height(h). The center is x-w/2,y+h/2 .
So know you have two points and know you need mathematical calculations
depending on your geometric figure to return every point on your border
of the figure. For me it was easier and quicker to return only a couple of
points like the head of a triangle.
Previous Topic:How to avoid overlapping with ManhattanConnectionRouter
Next Topic:Post Comments on Proposal for Background support in Figures
Goto Forum:
  


Current Time: Mon Sep 23 07:49:17 GMT 2024

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

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

Back to the top