* Source/GSSlideView.m: (- _slideFrom:to:): Calcuate number of

steps wrt image size.
* Source/GSDragView.m: (- slideDraggedImageTo:): Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24831 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
stoyan 2007-03-09 00:21:52 +00:00
parent 3c82286530
commit 604f3cabf2
3 changed files with 26 additions and 2 deletions

View file

@ -70,10 +70,15 @@
float distx = toPoint.x - fromPoint.x;
float disty = toPoint.y - fromPoint.y;
float dist = sqrt((distx * distx) + (disty * disty));
int steps = (int)(dist / MINDIST);
// int steps = (int)(dist / MINDIST);
NSSize imgSize = [[slideCell image] size];
float imgDist = sqrt((imgSize.width * imgSize.width) +
(imgSize.height * imgSize.height));
int steps = (int)(dist/imgDist);
int windowNumber = [_window windowNumber];
GSDisplayServer *server = GSServerForWindow(_window);
if (steps > 2)
{
float unitx = distx / steps;