summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/image_utils.h
blob: 22ed80ed274596f861e8d489b82047eb8c3cceb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// 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_
#pragma once

#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_