gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz ./TODO gzz/modules/pp/PPView2.java


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz ./TODO gzz/modules/pp/PPView2.java
Date: Tue, 05 Nov 2002 03:30:13 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/11/05 03:30:13

Modified files:
        .              : TODO 
        gzz/modules/pp : PPView2.java 

Log message:
        Clicking right

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.367&tr2=1.368&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/PPView2.java.diff?tr1=1.12&tr2=1.13&r1=text&r2=text

Patches:
Index: gzz/TODO
diff -u gzz/TODO:1.367 gzz/TODO:1.368
--- gzz/TODO:1.367      Tue Nov  5 03:21:01 2002
+++ gzz/TODO    Tue Nov  5 03:30:13 2002
@@ -98,7 +98,6 @@
        + new PEG for bubbleview, with some sketches
     tjl:        
        - PP [deadline 5.11]
-           - fix getting coordinate in main frame (click -> move is now wrong)
            - images
            - fillets main<->buoy
            - dragging texts
Index: gzz/gzz/modules/pp/PPView2.java
diff -u gzz/gzz/modules/pp/PPView2.java:1.12 
gzz/gzz/modules/pp/PPView2.java:1.13
--- gzz/gzz/modules/pp/PPView2.java:1.12        Tue Nov  5 03:21:01 2002
+++ gzz/gzz/modules/pp/PPView2.java     Tue Nov  5 03:30:13 2002
@@ -384,14 +384,21 @@
     /** Set the cursor clicked in the main view.
      */
     public void setCursorToMain(VobScene vs, float x, float y, 
-               AbstractViewContext context, int cs) {
+               AbstractViewContext context, int cs, int vp) {
        float[] hit = new float[2];
        int vobcs = vs.coords.getCSAt(cs, x, y, hit);
        if(vobcs < 0) {
            // No hit --> go to root paper cell, set pan
            context.setAccursed(context.getAccursed().h(d.contains));
            float[] pt = new float[] { x, y, 0 };
-           vs.coords.inverseTransformPoints3(cs, pt, pt);
+           // We must transform into Frame, and then the C2F coordinate system
+           int frame = ((DefaultVobMatcher)vs.matcher).getCS(vp, "frame");
+           int c2f = ((DefaultVobMatcher)vs.matcher).getCS(vp, "C2F");
+           if(frame < 0 || c2f < 0)
+               throw new Error("No cs point!"+frame+" "+c2f);
+           // XXX vp, not frame!
+           vs.coords.inverseTransformPoints3(vp, pt, pt);
+           vs.coords.inverseTransformPoints3(c2f, pt, pt);
            panx = pt[0]; pany = pt[1];
            return ;
        }
@@ -422,7 +429,7 @@
        Object key = vs.matcher.getKey(vp);
        if("MAINVP".equals(key)) {
            pa("Main viewport");
-           setCursorToMain(vs, x, y, context, cs);
+           setCursorToMain(vs, x, y, context, cs, vp);
        }
        if(! (key instanceof Pair)) {
            pa("Key is not pair!!! HELP "+key);
@@ -454,7 +461,7 @@
        Object key = vs.matcher.getKey(vp);
        if("MAINVP".equals(key)) {
            pa("Main viewport");
-           setCursorToMain(vs, x, y, context, cs);
+           setCursorToMain(vs, x, y, context, cs, vp);
        }
        if(! (key instanceof Pair)) {
            pa("Key is not pair!!! HELP "+key);




reply via email to

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