• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem drawing directly to bitmap rep using NSGraphicsContext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • RE: Problem drawing directly to bitmap rep using NSGraphicsContext
      • From: Vinay Prabhu <email@hidden>
References: 
 >Problem drawing directly to bitmap rep using NSGraphicsContext (From: Vinay Prabhu <email@hidden>)

  • Prev by Date: Re: Re: Problem drawing directly to bitmap rep using NSGraphicsContext
  • Next by Date: NSCalendarDate from CoreData
  • Previous by thread: Re: Problem drawing directly to bitmap rep using NSGraphicsContext
  • Next by thread: RE: Problem drawing directly to bitmap rep using NSGraphicsContext
  • Index(es):
    • Date
    • Thread