1 // Copyright (c) 2013 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.
5 #import "ui/base/cocoa/nsgraphics_context_additions.h"
7 @implementation NSGraphicsContext (CrAdditions)
9 - (void)cr_setPatternPhase:(NSPoint)phase
10 forView:(NSView*)view {
12 NSPoint bottomLeft = NSZeroPoint;
14 bottomLeft.y = NSMaxY([view bounds]);
15 NSPoint offset = [view convertPoint:bottomLeft toView:nil];
19 [self setPatternPhase:phase];