summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/image_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/cocoa/image_utils.h')
-rw-r--r--chrome/browser/cocoa/image_utils.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/image_utils.h b/chrome/browser/cocoa/image_utils.h
new file mode 100644
index 0000000..36a3bb4
--- /dev/null
+++ b/chrome/browser/cocoa/image_utils.h
@@ -0,0 +1,25 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_COCOA_IMAGE_UTILS_H_
+#define CHROME_BROWSER_COCOA_IMAGE_UTILS_H_
+
+#import <Cocoa/Cocoa.h>
+
+@interface NSImage (FlippedAdditions)
+
+// Works like |-drawInRect:fromRect:operation:fraction:|, except that
+// if |neverFlipped| is |YES|, and the context is flipped, the a
+// transform is applied to flip it again before drawing the image.
+//
+// Compare to the 10.6 method
+// |-drawInRect:fromRect:operation:fraction:respectFlipped:hints:|.
+- (void)drawInRect:(NSRect)dstRect
+ fromRect:(NSRect)srcRect
+ operation:(NSCompositingOperation)op
+ fraction:(CGFloat)requestedAlpha
+ neverFlipped:(BOOL)neverFlipped;
+@end
+
+#endif // CHROME_BROWSER_COCOA_IMAGE_UTILS_H_