Problem drawing directly to bitmap rep using NSGraphicsContext
Problem drawing directly to bitmap rep using NSGraphicsContext
- Subject: Problem drawing directly to bitmap rep using NSGraphicsContext
- From: Vinay Prabhu <email@hidden>
- Date: Tue, 28 Nov 2006 19:36:44 +0530
- Importance: Normal
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?
Regards
Vinay
_______________________________________________
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