Jump to content
  • Advertisement
Sign in to follow this  
ms75214

hitTestRect

This topic is 2492 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

For this NSImage method:

hitTestRect:withImageDestinationRect:context:hints:flipped:
Returns whether the destination rectangle would intersect a non-transparent portion of the image.
- (BOOL)hitTestRect:(NSRect)testRectDestSpace withImageDestinationRect:(NSRect)imageRectDestSpace context:(NSGraphicsContext *)referenceContext hints:(NSDictionary *)hints flipped:(BOOL)flipped

Is "flipped" referring to a horizontal flip or vertical flip?

Share this post


Link to post
Share on other sites
Advertisement
Flipped usually means vertically flipped. Horizonal flipping is usually referred to as mirroring.

Having said that, I have no idea about the NSImage class.

Share this post


Link to post
Share on other sites
Assuming this is the NSImage class from Cocoa, this section of the Cocoa Drawing Guide should have all the information might ever need about flipped graphics; but yes, Flipped appears to mean vertically flipped as per usual.

A simple way to figure out similar questions in future would be to try it out with a simple test image created so that you can clearly see the orientation. smile.png

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!