Home | History | Annotate | Download | only in cocoa
      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.
      4 
      5 #ifndef CHROME_BROWSER_UI_COCOA_RECT_PATH_UTILS_H_
      6 #define CHROME_BROWSER_UI_COCOA_RECT_PATH_UTILS_H_
      7 
      8 #import <Cocoa/Cocoa.h>
      9 
     10 namespace rect_path_utils {
     11 
     12 enum RoundedCornerFlags {
     13   RoundedCornerAll = 0,
     14   RoundedCornerLeft = 1
     15 };
     16 
     17 NSBezierPath *RectPathWithInset(RoundedCornerFlags roundedCornerFlags,
     18                                 const NSRect frame,
     19                                 const CGFloat insetX,
     20                                 const CGFloat insetY,
     21                                 const CGFloat outerRadius);
     22 
     23 void FillRectWithInset(RoundedCornerFlags roundedCornerFlags,
     24                        const NSRect frame,
     25                        const CGFloat insetX,
     26                        const CGFloat insetY,
     27                        const CGFloat outerRadius,
     28                        NSColor *color);
     29 
     30 void FrameRectWithInset(RoundedCornerFlags roundedCornerFlags,
     31                         const NSRect frame,
     32                         const CGFloat insetX,
     33                         const CGFloat insetY,
     34                         const CGFloat outerRadius,
     35                         const CGFloat lineWidth,
     36                         NSColor *color);
     37 
     38 } // namespace rect_path_utils
     39 
     40 #endif  // CHROME_BROWSER_UI_COCOA_RECT_PATH_UTILS_H_
     41