Re: Problem drawing directly to bitmap rep using NSGraphicsContext
Re: Problem drawing directly to bitmap rep using NSGraphicsContext
- Subject: Re: Problem drawing directly to bitmap rep using NSGraphicsContext
- From: "Shawn Erickson" <email@hidden>
- Date: Tue, 28 Nov 2006 12:37:42 -0800
On 11/28/06, Vinay Prabhu <email@hidden> wrote:
Hi,
In my application I am trying to directly draw into the bitmap rep.
The problem is only a fraction of the original image is drawn to the
NSBitmapRep.
Here is the code,
[NSGraphicsContext saveGraphicsState]
[NSGraphicsContext setCurrentContext:[NSGraphicsContext
graphicsContextWithBitmapImageRep:pBitmapRep]];
NSBitmapImageRep* imageRep = [[NSBitmapImageRep alloc] initWithData:[NSData
dataWithContentsOfFile:path]];
[imageRep drawInRect:NSMakeRect(0, 0, [imageRep pixelsWide], [imageRep
pixelsHifh])];
[NSGraphicsContext restoreGraphicsState];
What is wrong in this code?
Can you clarify what are you attempting to do?
-Shawn
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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