mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:20:38 +00:00
* 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:
parent
3c82286530
commit
604f3cabf2
3 changed files with 26 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue