
Public Member Functions | |
| (void) | - drawUnbufferedContentsInRect:drawingToBuffer: |
| Sent to the receiver when its content needs to be drawn. | |
If your interpreter subclass has complex drawing instructions, you may want to subclass this class instead of directly subclassing CorkPboardInterpreter. This class attempts to re-use what you draw wherever possible.
Due to the nature of buffered drawing (as implemented in Quartz on Mac OS X,) the exact content drawn may vary slightly from what you expect depending on the characteristics of the destination context. If you need pixel-perfect drawing, you should not use this class.
| - (void) drawUnbufferedContentsInRect: | (NSRect) | rect | ||
| drawingToBuffer: | (BOOL) | toBuffer | ||
Sent to the receiver when its content needs to be drawn.
Drawing can be performed using Cocoa or Quartz; since you need to compile your subclasses for both 32-bit and 64-bit, you cannot use QuickDraw.
On Mac OS X, you can use [NSGraphicsContext currentContext] to get the current Cocoa drawing context, or [[NSGraphicsContext currentContext] graphicsPort] for the current Quartz drawing context. On iPhone OS, you can use UIGraphicsGetCurrentContext() to get the current drawing context.
By default, this method fills rect with white so that the user can see the view, but does nothing otherwise.
CorkCore Framework Reference © 2008–2009 Ayluro, Inc. All rights reserved. Questions or comments? Contact us.