Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- /*
- @(#)ChopEllipseConnector.java 5.2
- */
- package CH.ifa.draw.figures;
- import java.awt.*;
- import CH.ifa.draw.framework.*;
- import CH.ifa.draw.standard.*;
- import CH.ifa.draw.util.Geom;
- public class ChopEllipseConnector extends ChopBoxConnector {
- private static final long serialVersionUID = -3165091511154766610L;
- public ChopEllipseConnector() {
- }
- public ChopEllipseConnector(Figure owner) {
- super(owner);
- }
- protected Point chop(Figure target, Point from) {
- Rectangle r = target.displayBox();
- double angle = Geom.pointToAngle(r, from);
- return Geom.ovalAngleToPoint(r, angle);
- }
- public void action(Figure figure, BorderTool B_T) {
- B_T.drawing().replace(figure, new BorderDecorator(figure));
- }
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.