ANN: Open Source Buffered View Class Available
ANN: Open Source Buffered View Class Available
- Subject: ANN: Open Source Buffered View Class Available
- From: Charles Jolley <email@hidden>
- Date: Fri, 2 Nov 2001 12:08:36 -0600
I have posted the source code to a small utility class I wrote to create
a view class that maintains a buffered image of itself. Unlike other
options available in the AppKit, this class maintains an image of the
view even if the view is not visible on the screen or even if it is not
connected to any window.
For views that are visible, you can set the view to display its buffered
image instead of drawing directly to the screen. This will not appear
any different to the user except that redraw of a simple bitmap can be
much faster than reconstructing the entire view. This is useful e.g.
for when you need to move a complex view around the screen, including
scrolling or resizing operations.
Views drawn using a buffered view will also respect view order properly,
thus if you have two views overlapping and the bottom view is displayed
using its buffered image, then the overlapping will look correct, even
if the top view is transparent.
The class is public domain and can be downloaded from:
http://www.okito.net/charles/macosx/OKBufferedView10.sit
As always, no warranty, use at your own risk, etc.
Cheers,
-Charles