|Re: Moving Anchor [message #222377 is a reply to message #222370]
||Thu, 31 August 2006 08:54
Originally posted by: tobias.brueggendick.prostep.com|
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.
Powered by FUDForum
. Page generated in 0.01537 seconds