gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] libvob/org/nongnu/libvob/impl OrthoCoorder.java


From: Matti Katila
Subject: [Gzz-commits] libvob/org/nongnu/libvob/impl OrthoCoorder.java
Date: Sat, 05 Apr 2003 15:25:10 -0500

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Changes by:     Matti Katila <address@hidden>   03/04/05 15:25:10

Modified files:
        org/nongnu/libvob/impl: OrthoCoorder.java 

Log message:
        workaround for awt coords bug.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/impl/OrthoCoorder.java.diff?tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: libvob/org/nongnu/libvob/impl/OrthoCoorder.java
diff -u libvob/org/nongnu/libvob/impl/OrthoCoorder.java:1.5 
libvob/org/nongnu/libvob/impl/OrthoCoorder.java:1.6
--- libvob/org/nongnu/libvob/impl/OrthoCoorder.java:1.5 Sat Apr  5 03:56:41 2003
+++ libvob/org/nongnu/libvob/impl/OrthoCoorder.java     Sat Apr  5 15:25:10 2003
@@ -35,7 +35,7 @@
  */
 
 public class OrthoCoorder extends VobCoorder {
-public static final String rcsid = "$Id: OrthoCoorder.java,v 1.5 2003/04/05 
08:56:41 mudyc Exp $";
+public static final String rcsid = "$Id: OrthoCoorder.java,v 1.6 2003/04/05 
20:25:10 mudyc Exp $";
     public static boolean dbg = false;
     private static void p(String s) { if(dbg) pa(s); }
     private static void pa(String s) { System.out.println("OrthoCoorder::"+s); 
}
@@ -143,8 +143,6 @@
     public int buoyOnCircle(int into, int anchor, float cx, float cy, float 
rad,
                             float px, float py, float min, float max)
     {
-       pa("buoy..");
-
        // check how far from center point anchor is
        float len = 0;
        float [] size = new float[2];
@@ -156,17 +154,16 @@
        float x = xy[0] + size[0]/2;
        float y = xy[1] + size[1]/2;
 
-       pa("anchor x/y: "+x+"/"+y);
+       //pa("anchor x/y: "+x+"/"+y);
 
        len = (float)Math.sqrt( (x-cx)*(x-cx) + (y-cy)*(y-cy) );
 
-       pa("len: "+len+", rad: "+rad);
+       //pa("len: "+len+", rad: "+rad);
 
        // if len is longer than rad - do nothing.
        float wh = min;
        int cs = anchor;
-       if (len <= rad || true) { 
-           pa("in buoyCS");
+       if (len <= rad) { 
 
            // project and translate buoy
 
@@ -175,11 +172,8 @@
            if (px-x != 0) // tan a = y/x
                ac = (py-y)/(px-x);
 
-           cs = translate(into, (float)Math.cos(ac)*rad/2, 
-                          (float)Math.sin(ac)*rad, (len/rad)*100 );
-
            //cs = orthoBox(0, (len/rad)*100,cx + (float)Math.cos(ac)*rad/2,
-           cs = orthoBox(0, 10f,cx + (float)Math.cos(ac)*rad/2,
+           cs = orthoBox(0, (len/rad)*99f,cx + (float)Math.cos(ac)*rad/2,
                          cy + (float)Math.sin(ac)*rad, 1,1, 50,50 );
            // box size not counted XXX XXX
            




reply via email to

[Prev in Thread] Current Thread [Next in Thread]