| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "chrome/browser/ui/cocoa/rect_path_utils.h" | 5 #import "chrome/browser/ui/cocoa/rect_path_utils.h" |
| 6 | 6 |
| 7 #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h" | 7 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSBezierPath+RoundRect
.h" |
| 8 | 8 |
| 9 namespace rect_path_utils { | 9 namespace rect_path_utils { |
| 10 | 10 |
| 11 NSBezierPath* RectPathWithInset(RoundedCornerFlags roundedCornerFlags, | 11 NSBezierPath* RectPathWithInset(RoundedCornerFlags roundedCornerFlags, |
| 12 const NSRect frame, | 12 const NSRect frame, |
| 13 const CGFloat insetX, | 13 const CGFloat insetX, |
| 14 const CGFloat insetY, | 14 const CGFloat insetY, |
| 15 const CGFloat outerRadius) { | 15 const CGFloat outerRadius) { |
| 16 NSRect insetFrame = NSInsetRect(frame, insetX, insetY); | 16 NSRect insetFrame = NSInsetRect(frame, insetX, insetY); |
| 17 | 17 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 const CGFloat finalInsetY = insetY + (lineWidth / 2.0); | 60 const CGFloat finalInsetY = insetY + (lineWidth / 2.0); |
| 61 NSBezierPath* path = | 61 NSBezierPath* path = |
| 62 RectPathWithInset(roundedCornerFlags, frame, finalInsetX, finalInsetY, | 62 RectPathWithInset(roundedCornerFlags, frame, finalInsetX, finalInsetY, |
| 63 outerRadius); | 63 outerRadius); |
| 64 [color setStroke]; | 64 [color setStroke]; |
| 65 [path setLineWidth:lineWidth]; | 65 [path setLineWidth:lineWidth]; |
| 66 [path stroke]; | 66 [path stroke]; |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace rect_path_utils | 69 } // namespace rect_path_utils |
| OLD | NEW |