bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: implementation of [NSWindow cacheImageInRect:]


From: Nicola Pero
Subject: Re: implementation of [NSWindow cacheImageInRect:]
Date: Fri, 12 Jul 2002 12:20:37 +0100 (BST)

> Hi,
> 
> The attached patch implements three missing methods in NSWindow:
> - cacheImageInRect:
> - restoreCachedImage
> - discardCachedImage
> It adds 2 new instance variables to NSWindow, forcing the recompilation of 
> everything.

Thanks - I applied your patch, the code looked Ok but I didn't really try
it ... do you have a testcase/example ?

I think this change should make Marko Riedel very happy :-) he was wanting
this enhancement for his puzzle game.

Marko, let us know if after this change caching images work and if it
helps with the drawing speed in your program !


> Apple's documentation on this is not very clear, in many places it seems that 
> more than one
> rectangle could be cached and restored.

Yes - I'm confused as well


> In this implementation, only the last rectangle is kept. 
> There is this phrase in the documentation: "Only the last cached
> rectangle is remembered, and can be restored."

I think this should be enough ... or maybe not ?  I wonder if it might
happen that different parts of code (which do not know about each other,
say one in the gui library and one in the user application) might be
wanting to cache rectangles, each one would call cacheImageInRect:, only
when the second one does it, it would implicitly discard the one set by
the first one, causing a misdisplay.  Or maybe that should never happen
for some reason ?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]