Normand Briere
2019-07-27 1af7d3700724834e40ad8636bc9a56cdc3b19b15
Cone.java
....@@ -2,6 +2,7 @@
22
33 class Cone extends Biparam implements java.io.Serializable
44 {
5
+ static final long serialVersionUID = -2558098774090336324L; // -679715043452968126L;
56
67 Cone()
78 {
....@@ -262,9 +263,11 @@
262263 editWindow = objectUI.GetEditor();
263264 }
264265
265
- void drawEditHandles(ClickInfo info, int level)
266
+ void drawEditHandles(//ClickInfo info,
267
+ int level)
266268 {
267
- super.drawEditHandles(info, level);
269
+ super.drawEditHandles(//info,
270
+ level);
268271 if (level == 1)
269272 {
270273 return;
....@@ -272,37 +275,39 @@
272275 {
273276 cVector temp = new cVector();
274277 LA.xformPos(base, toParent, temp);
275
- Rectangle baseSpot = calcHotSpot(temp, info);
278
+ Rectangle baseSpot = calcHotSpot(temp); //, info);
276279 LA.xformPos(apex, toParent, temp);
277
- Rectangle apexSpot = calcHotSpot(temp, info);
278
- info.g.setColor(Color.green);
279
- info.g.fillRect(baseSpot.x, baseSpot.y, baseSpot.width, baseSpot.height);
280
- info.g.fillRect(apexSpot.x, apexSpot.y, apexSpot.width, apexSpot.height);
280
+ Rectangle apexSpot = calcHotSpot(temp); //, info);
281
+ clickInfo.g.setColor(Color.green);
282
+ clickInfo.g.fillRect(baseSpot.x, baseSpot.y, baseSpot.width, baseSpot.height);
283
+ clickInfo.g.fillRect(apexSpot.x, apexSpot.y, apexSpot.width, apexSpot.height);
281284 return;
282285 }
283286 }
284287
285
- boolean doEditClick(ClickInfo info, int level)
288
+ boolean doEditClick(//ClickInfo info,
289
+ int level)
286290 {
287291 //if (level == 0)
288292 //return false;
289293 hitSomething = 0;
290
- if (super.doEditClick(info, level))
294
+ if (super.doEditClick(//info,
295
+ level))
291296 {
292297 hitSomething = 1;
293298 return true;
294299 }
295300 cVector temp = new cVector();
296301 LA.xformPos(base, toParent, temp);
297
- Rectangle baseSpot = calcHotSpot(temp, info);
302
+ Rectangle baseSpot = calcHotSpot(temp); //, info);
298303 LA.xformPos(apex, toParent, temp);
299
- Rectangle apexSpot = calcHotSpot(temp, info);
300
- if (baseSpot.contains(info.x, info.y))
304
+ Rectangle apexSpot = calcHotSpot(temp); //, info);
305
+ if (baseSpot.contains(clickInfo.x, clickInfo.y))
301306 {
302307 hitSomething = 2;
303308 startRad = baseRadius;
304309 } else
305
- if (apexSpot.contains(info.x, info.y))
310
+ if (apexSpot.contains(clickInfo.x, clickInfo.y))
306311 {
307312 hitSomething = 3;
308313 startRad = apexRadius;
....@@ -310,20 +315,22 @@
310315 {
311316 return false;
312317 }
313
- startX = info.x;
318
+ startX = clickInfo.x;
314319 return true;
315320 }
316321
317
- void doEditDrag(ClickInfo info, boolean opposite)
322
+ void doEditDrag(//ClickInfo info,
323
+ boolean opposite)
318324 {
319325 if (hitSomething == 0)
320326 return;
321327 if (hitSomething == 1)
322328 {
323
- super.doEditDrag(info, opposite);
329
+ super.doEditDrag(//info,
330
+ opposite);
324331 return;
325332 }
326
- double deltaR = info.x - startX;
333
+ double deltaR = clickInfo.x - startX;
327334 double newRad = startRad + deltaR;
328335 if (newRad < 0)
329336 newRad = 0;
....@@ -332,7 +339,7 @@
332339 else
333340 apexRadius = newRad;
334341 recalculate();
335
- info.pane.repaint();
342
+ clickInfo.pane.repaint();
336343 }
337344
338345 cVector base;