• 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: NSBitMapImageRep Woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSBitMapImageRep Woes (From: David Blanton <email@hidden>)

  • Prev by Date: Re: NSBitMapImageRep Woes
  • Next by Date: Re: NSBitMapImageRep Woes
  • Previous by thread: Re: NSBitMapImageRep Woes
  • Next by thread: Re: NSBitMapImageRep Woes
  • Index(es):
    • Date
    • Thread