hitTestRect

Started by
1 comment, last by jbadams 12 years, 2 months ago
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?
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.
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

- Jason Astle-Adams

This topic is closed to new replies.

Advertisement