[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSWindow (cacheImageInRect) & Puzzle.
From: |
Nicola Pero |
Subject: |
Re: NSWindow (cacheImageInRect) & Puzzle. |
Date: |
Tue, 16 Jul 2002 20:02:45 +0100 (BST) |
Hi Marko,
I had a quick look at the cache image rect code, and I think the bug was
that it was using the content view as the view with the window coordinate
system. This is not correct - the content view is set arbitrarily by the
programmer and can be flipped or have other coordinate system changes.
Instead, the window view should be used. I changed the code to use the
window view. The window view always has the coordinate system which is
the unchanged window one.
I'm sure this change was needed, I'm not sure it was enough to make it
work :-) anyway I committed the change to CVS and hope it works now :-)
Thanks for finding the problem, for your code and for looking into it.
> I have also uploaded a new version of my Puzzle program to my GNUstep
> page. There is some improvement, but not as much as I would like.
I tried your new version of GPuzzle in order to check that cached image
rects worked with my patch, and it seems to work.
I can see a dramatic improvement :-)
When I used the old version, moving big clusters of pieces used to drive
me mad (it was unbelievably slow). The new version is still a bit clumsy
(/slow) with big clusters in some conditions, but it works very well (I
don't dare to say it's fast, but that's what I felt!) in normal
conditions. I'm quite impressed! :-)
We can certainly do better, but it's a first step. And what a step
compared to before. Wow.