Re: NSBitMapImageRep Woes
Re: NSBitMapImageRep Woes
- Subject: Re: NSBitMapImageRep Woes
- From: Ken Thomases <email@hidden>
- Date: Wed, 6 Jan 2010 11:43:50 -0600
On Jan 6, 2010, at 11:21 AM, David Blanton wrote:
> - (void)drawRect:(NSRect)dirtyRect {
>
> [NSGraphicsContext saveGraphicsState];
> [m_NSBitmapImageRep drawInRect:dirtyRect];
> [NSGraphicsContext restoreGraphicsState];
> }
The docs for -drawInRect: say it does nothing if you haven't set the size of the image. I know the size is (potentially) different from the pixel-width/height, although I don't know if NSBitmapImageRep assumes an initial size based on the pixel dimensions.
Also, you probably don't want to draw to the dirty rect. You want to draw to the view's bounds, presumably.
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden