From 90c87ae87a6d1b88ed8398da7bb95629f0df5b09 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Thu, 01 Aug 2019 00:10:11 -0400
Subject: [PATCH] Scale handle.
---
CameraPane.java | 2 +-
Object3D.java | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/CameraPane.java b/CameraPane.java
index 28924e5..5bb4b19 100644
--- a/CameraPane.java
+++ b/CameraPane.java
@@ -16091,7 +16091,7 @@
gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
break;
case Object3D.hitScale: gr.setColor(Color.cyan);
- gr.drawLine(X, Y, 0, 0);
+ gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
break;
}
diff --git a/Object3D.java b/Object3D.java
index 1e36e28..c74c81c 100644
--- a/Object3D.java
+++ b/Object3D.java
@@ -7493,7 +7493,7 @@
hitSomething = hitScale;
double scale = 0.005f * clickInfo.camera.Distance();
- double hScale = (double) (clickInfo.x /*- centerPt.x*/) / 32;
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
double sign = 1;
if (hScale < 0)
{
@@ -7505,7 +7505,7 @@
//hScale = 0.01;
}
- double vScale = (double) (clickInfo.y /*- centerPt.y*/) / 32;
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
sign = 1;
if (vScale < 0)
{
@@ -7720,7 +7720,7 @@
break;
case hitScale: // scale
- double hScale = (double) (clickInfo.x /*- centerPt.x*/) / 32;
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
double sign = 1;
if (hScale < 0)
{
@@ -7732,7 +7732,7 @@
//hScale = 0.01;
}
- double vScale = (double) (clickInfo.y /*- centerPt.y*/) / 32;
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
sign = 1;
if (vScale < 0)
{
--
Gitblit v1.6.2