From b1d79b74514041a059b454a9f6fc3970773c0cb8 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Mon, 12 Aug 2019 18:19:30 -0400
Subject: [PATCH] Compact toolbar.

---
 Cone.java |   49 ++++++++++++++++++++++++++++++-------------------
 1 files changed, 30 insertions(+), 19 deletions(-)

diff --git a/Cone.java b/Cone.java
index 938fe77..de9ce0f 100644
--- a/Cone.java
+++ b/Cone.java
@@ -2,7 +2,7 @@
 
 class Cone extends Biparam implements java.io.Serializable
 {
-    //static final long serialVersionUID = -679715043452968126L;
+    static final long serialVersionUID = -2558098774090336324L; // -679715043452968126L;
 
     Cone()
     {
@@ -193,6 +193,11 @@
         return inside;
     }
 
+    double uStretch()
+    {
+        return 6; // Actually 6.28 (I think)
+    }
+    
     Vertex biparamFunction(double u, double v)
     {
         cVector tPos;
@@ -263,9 +268,11 @@
         editWindow = objectUI.GetEditor();
     }
 
-    void drawEditHandles(ClickInfo info, int level)
+    void drawEditHandles(//ClickInfo info,
+            int level)
     {
-        super.drawEditHandles(info, level);
+        super.drawEditHandles(//info,
+                level);
         if (level == 1)
         {
             return;
@@ -273,37 +280,39 @@
         {
             cVector temp = new cVector();
             LA.xformPos(base, toParent, temp);
-            Rectangle baseSpot = calcHotSpot(temp, info);
+            Rectangle baseSpot = calcHotSpot(temp); //, info);
             LA.xformPos(apex, toParent, temp);
-            Rectangle apexSpot = calcHotSpot(temp, info);
-            info.g.setColor(Color.green);
-            info.g.fillRect(baseSpot.x, baseSpot.y, baseSpot.width, baseSpot.height);
-            info.g.fillRect(apexSpot.x, apexSpot.y, apexSpot.width, apexSpot.height);
+            Rectangle apexSpot = calcHotSpot(temp); //, info);
+            clickInfo.g.setColor(Color.green);
+            clickInfo.g.fillRect(baseSpot.x, baseSpot.y, baseSpot.width, baseSpot.height);
+            clickInfo.g.fillRect(apexSpot.x, apexSpot.y, apexSpot.width, apexSpot.height);
             return;
         }
     }
 
-    boolean doEditClick(ClickInfo info, int level)
+    boolean doEditClick(//ClickInfo info,
+            int level)
     {
         //if (level == 0)
             //return false;
         hitSomething = 0;
-        if (super.doEditClick(info, level))
+        if (super.doEditClick(//info,
+                level))
         {
             hitSomething = 1;
             return true;
         }
         cVector temp = new cVector();
         LA.xformPos(base, toParent, temp);
-        Rectangle baseSpot = calcHotSpot(temp, info);
+        Rectangle baseSpot = calcHotSpot(temp); //, info);
         LA.xformPos(apex, toParent, temp);
-        Rectangle apexSpot = calcHotSpot(temp, info);
-        if (baseSpot.contains(info.x, info.y))
+        Rectangle apexSpot = calcHotSpot(temp); //, info);
+        if (baseSpot.contains(clickInfo.x, clickInfo.y))
         {
             hitSomething = 2;
             startRad = baseRadius;
         } else
-        if (apexSpot.contains(info.x, info.y))
+        if (apexSpot.contains(clickInfo.x, clickInfo.y))
         {
             hitSomething = 3;
             startRad = apexRadius;
@@ -311,20 +320,22 @@
         {
             return false;
         }
-        startX = info.x;
+        startX = clickInfo.x;
         return true;
     }
 
-    void doEditDrag(ClickInfo info, boolean opposite)
+    void doEditDrag(//ClickInfo info,
+            boolean opposite)
     {
         if (hitSomething == 0)
             return;
         if (hitSomething == 1)
         {
-            super.doEditDrag(info, opposite);
+            super.doEditDrag(//info,
+                    opposite);
             return;
         }
-        double deltaR = info.x - startX;
+        double deltaR = clickInfo.x - startX;
         double newRad = startRad + deltaR;
         if (newRad < 0)
             newRad = 0;
@@ -333,7 +344,7 @@
         else
             apexRadius = newRad;
         recalculate();
-        info.pane.repaint();
+        clickInfo.pane.repaint();
     }
 
     cVector base;

--
Gitblit v1.6.2