SHARE
TWEET

Untitled

AishaAli Nov 19th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. /*
  3.   @(#)ChopEllipseConnector.java 5.2
  4.  */
  5.  
  6. package CH.ifa.draw.figures;
  7.  
  8. import java.awt.*;
  9. import CH.ifa.draw.framework.*;
  10. import CH.ifa.draw.standard.*;
  11. import CH.ifa.draw.util.Geom;
  12.  
  13. public class ChopEllipseConnector extends ChopBoxConnector {
  14.  
  15.     private static final long serialVersionUID = -3165091511154766610L;
  16.  
  17.     public ChopEllipseConnector() {
  18.     }
  19.  
  20.     public ChopEllipseConnector(Figure owner) {
  21.         super(owner);
  22.     }
  23.  
  24.     protected Point chop(Figure target, Point from) {
  25.         Rectangle r = target.displayBox();
  26.         double angle = Geom.pointToAngle(r, from);
  27.         return Geom.ovalAngleToPoint(r, angle);
  28.     }
  29. }
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. OK, I Understand
Top