gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz ./TODO gfx/libcoords/Coords.cxx gzz/view/bu...


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz ./TODO gfx/libcoords/Coords.cxx gzz/view/bu...
Date: Wed, 05 Feb 2003 13:31:02 -0500

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

Modified files:
        .              : TODO 
        gfx/libcoords  : Coords.cxx 
        gzz/view/buoy  : pagespanNodes.py 
Added files:
        gfx/libutil    : Templates.hxx 

Log message:
        Box sizes for nadircs

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.561&tr2=1.562&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libcoords/Coords.cxx.diff?tr1=1.66&tr2=1.67&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libutil/Templates.hxx?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/buoy/pagespanNodes.py.diff?tr1=1.11&tr2=1.12&r1=text&r2=text

Patches:
Index: gzz/TODO
diff -u gzz/TODO:1.561 gzz/TODO:1.562
--- gzz/TODO:1.561      Wed Feb  5 09:54:10 2003
+++ gzz/TODO    Wed Feb  5 13:31:01 2003
@@ -16,6 +16,7 @@
 HT03 deadline:
     tjl:
        - the great buoy redesign
+           - nadir box size; box size tests
            - make pagespan nodes show just the span, when
              shown as buoys!
            - make buoys return the anchor
Index: gzz/gfx/libcoords/Coords.cxx
diff -u gzz/gfx/libcoords/Coords.cxx:1.66 gzz/gfx/libcoords/Coords.cxx:1.67
--- gzz/gfx/libcoords/Coords.cxx:1.66   Wed Feb  5 07:27:35 2003
+++ gzz/gfx/libcoords/Coords.cxx        Wed Feb  5 13:31:01 2003
@@ -4,6 +4,7 @@
 #include <boost/numeric/ublas/matrix.hpp>
 #include <boost/numeric/ublas/io.hpp>
 
+#include "libutil/Templates.hxx"
 #include "libutil/Debug.hxx"
 #include "libfisheye/Fisheye.hxx"
 #include "Coords.hxx"
@@ -97,13 +98,24 @@
 
 };
 
-template<class Deriver> 
+template<class Deriver, bool boxSize = false> 
        class DerivedTransformCoordSys : 
            public TransformCoordSys<typename Deriver::BaseTransform> {
     CoordSys *dep[Deriver::NDetermining >? 1];
     float nparams[Deriver::BaseTransform::NParams];
     Deriver d;
 
+    Pt nonvirt_getSqSize(Templates::Int2Type<false> x) {
+       return Pt(1, 1);
+    }
+
+    Pt nonvirt_getSqSize(Templates::Int2Type<true> x) {
+       return d.getSqSize();
+    }
+
+    virtual Pt getSqSize() {
+       return nonvirt_getSqSize(Templates::Int2Type<boxSize>());
+    }
 
     virtual void setSuper(CoordSys **super) {
        CoordSys::setSuper(super);
@@ -580,8 +592,10 @@
        typedef RotateXYCoords BaseTransform;
        enum { NParams = 0,
                NDetermining = 1 };
+       CoordSys *super;
        void derivedParams(CoordSys *super, CoordSys **nadirCSp,
                            float *params, float *newparams) {
+           this->super = super;
            CoordSys *nadirCS = *nadirCSp;
            ZPt origin = super->transform(ZPt(0,0,0));
            ZPt nadir = nadirCS->transform(ZPt(0,0,0));
@@ -595,6 +609,9 @@
        bool shouldBeDrawn() {
            return true;
        }
+       Pt getSqSize() {
+           return super->getSqSize();
+       }
     };
 
 
@@ -665,8 +682,10 @@
        typedef RotateXYCenteredCoords BaseTransform;
        enum { NParams = 0,
                NDetermining = 1 };
+       CoordSys *super;
        void derivedParams(CoordSys *super, CoordSys **nadirCSp,
                            float *params, float *newparams) {
+           this->super = super;
            CoordSys *nadirCS = *nadirCSp;
 
            Pt usq = super->getSqSize();
@@ -689,6 +708,9 @@
        bool shouldBeDrawn() {
            return true;
        }
+       Pt getSqSize() {
+           return super->getSqSize();
+       }
     };
 
 
@@ -1334,13 +1356,13 @@
        virtual int nparents() { return 1; }
        virtual CoordSys *create() { return new TransformWHCoordSys<C>(); }
     };
-    template<class C> class DerTransFactory : public SomeFactory {
+    template<class C, bool Sq = false> class DerTransFactory : public 
SomeFactory {
     public:
        virtual int nparams() { return C::NParams; }
        virtual int nprevious() { return C::NDetermining + 1; }
        virtual int nparents() { return 1; }
        virtual CoordSys *create() { 
-           return new DerivedTransformCoordSys<C>(); 
+           return new DerivedTransformCoordSys<C, Sq>(); 
        }
     };
     template<class C> class NoTransFactory : public SomeFactory {
@@ -1370,7 +1392,7 @@
        new TransFactory<TranslateXYZCoords>(), // 6
        new DerTransFactory<BuoyOnCircleCoords>(), // 7
        new NoTransFactory<ConcatCoordSys>(), // 8
-       new DerTransFactory<NadirOriginCoords>(), // 9
+       new DerTransFactory<NadirOriginCoords, true>(), // 9
        new NoTransFactory<CullingCoordSys>(), // 10
        new WHTransFactory<BoxCoords>(), // 11
        new DerTransFactory<UnitSqCoords>(), // 12
@@ -1378,7 +1400,7 @@
        new WHTransFactory<OrthoBoxCoords>(), // 14
        new NoTransFactory<InverseCoordSys>(), // 15
        new TransFactory<RotateXYCenteredCoords>(), // 16
-       new DerTransFactory<NadirUniSqCoords>(), // 17
+       new DerTransFactory<NadirUniSqCoords, true>(), // 17
        0
     };
 
Index: gzz/gzz/view/buoy/pagespanNodes.py
diff -u gzz/gzz/view/buoy/pagespanNodes.py:1.11 
gzz/gzz/view/buoy/pagespanNodes.py:1.12
--- gzz/gzz/view/buoy/pagespanNodes.py:1.11     Wed Feb  5 09:09:03 2003
+++ gzz/gzz/view/buoy/pagespanNodes.py  Wed Feb  5 13:31:02 2003
@@ -32,6 +32,7 @@
        # find edges of span
        # should place only that region surrounded by irregu
        sb = anchorSpan.getScrollBlock();
+
        pscv.place(makeEnf(sb.getCurrent()), vs, into, 
                    .5, 200);
 




reply via email to

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