[Patchanim-commit] SF.net SVN: patchanim: [97] trunk/patchanim/src/com/mebigfatguy/patchanim/ gui/
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2008-02-03 02:39:34
|
Revision: 97
http://patchanim.svn.sourceforge.net/patchanim/?rev=97&view=rev
Author: dbrosius
Date: 2008-02-02 18:39:39 -0800 (Sat, 02 Feb 2008)
Log Message:
-----------
clip dragging to the u,v bounds
Modified Paths:
--------------
trunk/patchanim/src/com/mebigfatguy/patchanim/gui/JColorControlPatchPanel.java
Modified: trunk/patchanim/src/com/mebigfatguy/patchanim/gui/JColorControlPatchPanel.java
===================================================================
--- trunk/patchanim/src/com/mebigfatguy/patchanim/gui/JColorControlPatchPanel.java 2008-02-03 02:35:56 UTC (rev 96)
+++ trunk/patchanim/src/com/mebigfatguy/patchanim/gui/JColorControlPatchPanel.java 2008-02-03 02:39:39 UTC (rev 97)
@@ -174,6 +174,9 @@
/*
double inputX = ((p.x - bounds.x) * 100.0) / bounds.width;
double inputY = ((p.y - bounds.y) * 100.0) / bounds.height;
+ inputX = Math.min(100.0, Math.max(inputX, 0.0));
+ inputY = Math.min(100.0, Math.max(inputY, 0.0));
+
Coordinate c= coords.getCoordinate(selectedXPt, selectedYPt);
double oldX = c.getX();
double oldY = c.getY();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|