[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Drawing aside of -drawRect
From: |
Tima Vaisburd |
Subject: |
Drawing aside of -drawRect |
Date: |
Mon, 8 Sep 2003 21:03:14 -0700 |
User-agent: |
KMail/1.4.3 |
Hello everybody,
I have problems with drawing in any method but [NSView -drawRect].
I placed the drawing code directly in the mouse event processing
handler, like this:
// This is a method of NSView subclass
- (void) mouseDragged:(NSEvent *) event
{
NSPoint sketch_origin = ... ;
[self lockFocus];
// NSImage * _sketch, * _mask defined elsewhere
[_sketch compositeToPoint: sketch_origin operation: NSCompositeCopy];
[_mask compositeToPoint: sketch_origin
operation: NSCompositeSourceOver];
[self unlockFocus];
}
}
Nothing happens when the backing store is buffered or retained.
What do I miss?
Thank you,
Tima.
- Drawing aside of -drawRect,
Tima Vaisburd <=