How to draw a NSImage in a view
How to draw a NSImage in a view
- Subject: How to draw a NSImage in a view
- From: Quentin Mathé <email@hidden>
- Date: Tue, 10 Jul 2001 08:53:48 +0200
I have a subclass of NSView with two methods :
- (void)drawRect:(NSRect)rect
{
NSRect myBounds = [self bounds];
[tableViewImage drawInRect:myBounds
fromRect:myBounds
operation:NSCompositeCopy
fraction:nil];
}
I don't understand what is the use of the parameters fromRect and
fraction...
- (void)setTableViewImage:(NSImage *)image
{
[tableViewImage autorelease];
tableViewImage = [image copy];
[self setNeedsDisplay:YES];
}
When I call setTableViewImage, the NSView displays nothing, why ?
--
Quentin Mathi
email@hidden