• 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: CGBitmapRef and User Space Coordinates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGBitmapRef and User Space Coordinates


  • Subject: Re: CGBitmapRef and User Space Coordinates
  • From: Michael Vannorsdel <email@hidden>
  • Date: Tue, 15 Apr 2008 20:59:14 -0600

Coordinate conversion should not be needed as the rect passed to the drawRect: method is in the view's coordinate system. Perhaps if you could give us a sample of what your drawing code looks like.


On Apr 15, 2008, at 8:52 PM, Carter R. Harrison wrote:

Hi All,

I have a CGBitmapRef that I am using as a backing store for my NSView subclass. The CGBitmapRef has the same dimensions as my NSView. Each time I draw to the backing store, I call my view's setNeedsDisplayInRect: method to invalidate the area in which I have drawn. Is it necessary to convert the rectangle to which I have drawn into user space coordinates before feeding them into setNeedsDisplayInRect:? It seems like I can get away without doing this because my view is the same size as the backing store, but I'm getting some weird behavior (things drawing correctly but in the wrong area). Thanks in advance.

_______________________________________________

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: 
 >CGBitmapRef and User Space Coordinates (From: "Carter R. Harrison" <email@hidden>)

  • Prev by Date: CGBitmapRef and User Space Coordinates
  • Next by Date: Re: Resizing NSView with CABasicAnimation
  • Previous by thread: CGBitmapRef and User Space Coordinates
  • Next by thread: EXC_BAD_ACCESS on releasing pool
  • Index(es):
    • Date
    • Thread