Fixing other headers
[ITKit.git] / ITTSWBackgroundView.m
1 #import "ITGrayRoundedView.h"
2
3
4 @implementation ITGrayRoundedView
5
6 - (void)drawRect:(NSRect)theRect
7 {
8     NSBezierPath *path = [NSBezierPath bezierPath];
9     float vh = NSHeight(theRect);
10     float vw = NSWidth(theRect);
11     [path moveToPoint:NSMakePoint( 0.0, (vh - 24.0) )];   //  first point
12     [path curveToPoint:NSMakePoint( 24.0, vh )
13          controlPoint1:NSMakePoint( 0.0, (vh - 11.0) )
14          controlPoint2:NSMakePoint( 11.0, vh )];                  //  top-left curve
15     [path lineToPoint:NSMakePoint( (vw - 24.0), vh )];    //  top line
16     [path curveToPoint:NSMakePoint( vw, (vh - 24.0) )
17          controlPoint1:NSMakePoint( (vw - 11.0), vh )
18          controlPoint2:NSMakePoint( vw, (vh - 11.0) )];   //  top-right curve
19     [path lineToPoint:NSMakePoint( vw, 24.0 )];           //  right line
20     [path curveToPoint:NSMakePoint( (vw - 24.0), 0.0 )
21          controlPoint1:NSMakePoint( vw, 11.0 )
22          controlPoint2:NSMakePoint( (vw - 11.0), 0.0 )];  //  bottom-right curve
23     [path lineToPoint:NSMakePoint( 24.0, 0.0 )];          //  bottom line
24     [path curveToPoint:NSMakePoint( 0.0, 24.0 )
25          controlPoint1:NSMakePoint( 11.0, 0.0 )
26          controlPoint2:NSMakePoint( 0.0, 11.0 )];         //  bottom-left curve
27     [path closePath];                                                                     //  left line
28
29     [[NSColor colorWithCalibratedWhite:0.0 alpha:0.15] set];
30     [path fill];
31 }
32
33 - (BOOL)isOpaque
34 {
35     return NO;
36 }
37
38 @end