1// Copyright (c) 2010 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_UI_COCOA_IMAGE_UTILS_H_
6#define CHROME_BROWSER_UI_COCOA_IMAGE_UTILS_H_
7#pragma once
8
9#import <Cocoa/Cocoa.h>
10
11@interface NSImage (FlippedAdditions)
12
13// Works like |-drawInRect:fromRect:operation:fraction:|, except that
14// if |neverFlipped| is |YES|, and the context is flipped, the a
15// transform is applied to flip it again before drawing the image.
16//
17// Compare to the 10.6 method
18// |-drawInRect:fromRect:operation:fraction:respectFlipped:hints:|.
19- (void)drawInRect:(NSRect)dstRect
20          fromRect:(NSRect)srcRect
21         operation:(NSCompositingOperation)op
22          fraction:(CGFloat)requestedAlpha
23      neverFlipped:(BOOL)neverFlipped;
24@end
25
26#endif  // CHROME_BROWSER_UI_COCOA_IMAGE_UTILS_H_
27