diff options
Diffstat (limited to 'ui/base/cocoa/nsgraphics_context_additions.h')
-rw-r--r-- | ui/base/cocoa/nsgraphics_context_additions.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ui/base/cocoa/nsgraphics_context_additions.h b/ui/base/cocoa/nsgraphics_context_additions.h new file mode 100644 index 0000000..7a373ef --- /dev/null +++ b/ui/base/cocoa/nsgraphics_context_additions.h @@ -0,0 +1,23 @@ +// Copyright (c) 2013 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 UI_BASE_COCOA_NSGRAPHICS_CONTEXT_ADDITIONS_H_ +#define UI_BASE_COCOA_NSGRAPHICS_CONTEXT_ADDITIONS_H_ + +#import <Cocoa/Cocoa.h> + +@interface NSGraphicsContext (CrAdditions) + +// When a view is not layer backed the pattern phase is relative to the origin +// of the window's content view. With a layer backed view the pattern phase is +// relative to the origin of the view. +// +// For layer backed view this method offsets the pattern phase to match the +// behavior of non layer backed views. +- (void)cr_setPatternPhase:(NSPoint)phase + forView:(NSView*)view; + +@end + +#endif // UI_BASE_COCOA_NSGRAPHICS_CONTEXT_ADDITIONS_H_ |