Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: MODIFIED: presentation ...

gef
Discussion topic

Back to topic list

CVS update: MODIFIED: presentation ...

Reply

Author thn
Full name Thomas Neustupny
Date 2002-04-30 16:10:24 PDT
Message User: thn
  Date: 02/04/30 16:10:24

  Modified: src/org/tigris/gef/presentation FigCircle.java
  Log:
  connectionPoint(Point) overriden
  
  Revision Changes Path
  1.3 +27 -14 gef/src/org/tigris/g​ef/presentation/FigC​ircle.java
  
  http://gef.tigris.or​g/source/browse/gef/​src/org/tigris/gef/p​resentation/FigCircl​e.java.diff?r1=1.2​&r2=1.3
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: FigCircle.java
  ====================​====================​====================​=======
  RCS file: /usr/local/tigris/da​ta/helm/cvs/reposito​ry/gef/src/org/tigri​s/gef/presentation/F​igCircle.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- FigCircle.java 2002/02/28 09:12:03 1.2
  +++ FigCircle.java 2002/04/30 23:10:24 1.3
  @@ -26,7 +26,7 @@
   // File: FigCircle.java
   // Classes: FigCircle
   // Original Author: ics125 spring 1996
  -// $Id: FigCircle.java,v 1.2 2002/02/28 09:12:03 1sturm Exp $
  +// $Id: FigCircle.java,v 1.3 2002/04/30 23:10:24 thn Exp $
   
   package org.tigris.gef.presentation;
   
  @@ -111,6 +111,19 @@
           double dy = ((double)(_y + _h/2 - y)) * 2 / _h;
           double distSquared = dx * dx + dy * dy;
           return distSquared <= 1.01;
  + }
  +
  + /** Calculate border point of elipse */
  + public Point connectionPoint(Point anotherPt) {
  + double rx = _w/2;
  + double ry = _h/2;
  + double dx = anotherPt.x - _x;
  + double dy = anotherPt.y - _y;
  + double dd = ry*ry*dx*dx + rx*rx*dy*dy;
  + double mu = rx*ry/Math.sqrt(dd);
  + Point res = new Point((int)(mu*dx+_x​+rx),(int)(mu*dy+_y+​ry));
  + //System.out.println​("connectionPoint(p)​ returns "+res.x+','+res.y+')');
  + return res;
       }
   } /* end class FigCircle */
   
  
  
  

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe at gef dot tigris dot org
For additional commands, e-mail: cvs-help at gef dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: MODIFIED: presentation ... thn Thomas Neustupny 2002-04-30 16:10:24 PDT
Messages per page: