@@ -19,39 +19,39 @@ + (CIVector*) vectorWithPoint: (NSPoint)point {
19
19
}
20
20
21
21
- (float ) lesserX : (CIVector *)other {
22
- if ([ self X ] < [ other X ] )
23
- return [ self X ] ;
22
+ if (self. X < other. X )
23
+ return self. X ;
24
24
else
25
- return [ other X ] ;
25
+ return other. X ;
26
26
}
27
27
28
28
- (float ) lesserY : (CIVector *)other {
29
- if ([ self Y ] < [ other Y ] )
30
- return [ self Y ] ;
29
+ if (self. Y < other. Y )
30
+ return self. Y ;
31
31
else
32
- return [ other Y ] ;
32
+ return other. Y ;
33
33
}
34
34
35
35
- (float ) lesserZ : (CIVector *)other {
36
- if ([ self Z ] < [ other Z ] )
37
- return [ self Z ] ;
36
+ if (self. Z < other. Z )
37
+ return self. Z ;
38
38
else
39
- return [ other Z ] ;
39
+ return other. Z ;
40
40
}
41
41
42
42
- (float ) lesserW : (CIVector *)other {
43
- if ([ self W ] < [ other W ] )
44
- return [ self W ] ;
43
+ if (self. W < other. W )
44
+ return self. W ;
45
45
else
46
- return [ other W ] ;
46
+ return other. W ;
47
47
}
48
48
49
49
- (CIVector *) bottomLeft : (CIVector *)other {
50
50
return [CIVector vectorWithX: [self lesserX: other] Y: [self lesserY: other] Z: [self lesserZ: other] W: [self lesserW: other]];
51
51
}
52
52
53
53
- (CGPoint ) toCGPoint {
54
- return CGPointMake ([ self X ], [ self Y ] );
54
+ return CGPointMake (self. X , self. Y );
55
55
}
56
56
57
57
@end
@@ -64,8 +64,8 @@ - (void)fillGradientFrom: (CIVector*)startVector color:(NSColor*)inStartColor to
64
64
inStartColor = [inStartColor colorUsingColorSpaceName: NSCalibratedRGBColorSpace ];
65
65
inEndColor = [inEndColor colorUsingColorSpaceName: NSCalibratedRGBColorSpace ];
66
66
67
- CIColor * startColor = [CIColor colorWithRed: [ inStartColor redComponent ] green: [ inStartColor greenComponent ] blue: [ inStartColor blueComponent ] alpha: [ inStartColor alphaComponent ] ];
68
- CIColor * endColor = [CIColor colorWithRed: [ inEndColor redComponent ] green: [ inEndColor greenComponent ] blue: [ inEndColor blueComponent ] alpha: [ inEndColor alphaComponent ] ];
67
+ CIColor * startColor = [CIColor colorWithRed: inStartColor. redComponent green: inStartColor. greenComponent blue: inStartColor. blueComponent alpha: inStartColor. alphaComponent];
68
+ CIColor * endColor = [CIColor colorWithRed: inEndColor. redComponent green: inEndColor. greenComponent blue: inEndColor. blueComponent alpha: inEndColor. alphaComponent];
69
69
70
70
CIVector *bottomLeft = [startVector bottomLeft: endVector];
71
71
@@ -82,7 +82,7 @@ - (void)fillGradientFrom: (CIVector*)startVector color:(NSColor*)inStartColor to
82
82
83
83
[[NSGraphicsContext currentContext ] saveGraphicsState ];
84
84
85
- CIContext * context = [[ NSGraphicsContext currentContext ] CIContext ] ;
85
+ CIContext * context = [NSGraphicsContext currentContext ]. CIContext ;
86
86
87
87
// can be setClip, but this may increase the current clipping rect beyond that intended
88
88
[self addClip ];
@@ -93,7 +93,7 @@ - (void)fillGradientFrom: (CIVector*)startVector color:(NSColor*)inStartColor to
93
93
};
94
94
95
95
CGRect gradientBounds = {
96
- [ bottomLeft toCGPoint ] ,
96
+ bottomLeft. toCGPoint ,
97
97
self.bounds .size
98
98
};
99
99
@@ -103,7 +103,7 @@ - (void)fillGradientFrom: (CIVector*)startVector color:(NSColor*)inStartColor to
103
103
}
104
104
105
105
- (void ) fillVerticalGradientTop : (NSColor *)top bottom : (NSColor *)bottom {
106
- NSRect bounds = [ self bounds ] ;
106
+ NSRect bounds = self. bounds ;
107
107
108
108
NSPoint a = bounds.origin ;
109
109
NSPoint b = NSMakePoint (bounds.origin .x , bounds.origin .y + bounds.size .height );
@@ -112,7 +112,7 @@ - (void) fillVerticalGradientTop: (NSColor*)top bottom: (NSColor*)bottom {
112
112
}
113
113
114
114
- (void ) fillHorizontalGradientLeft : (NSColor *)left right : (NSColor *)right {
115
- NSRect bounds = [ self bounds ] ;
115
+ NSRect bounds = self. bounds ;
116
116
117
117
NSPoint a = bounds.origin ;
118
118
NSPoint b = NSMakePoint (bounds.origin .x + bounds.size .width , bounds.origin .y );
@@ -133,7 +133,7 @@ - (instancetype)initWithFrame:(NSRect)frameRect
133
133
}
134
134
135
135
- (void )drawRect : (NSRect )rect {
136
- NSRect viewBounds = [ self bounds ] ;
136
+ NSRect viewBounds = self. bounds ;
137
137
NSBezierPath *p = [NSBezierPath bezierPathWithRect: viewBounds];
138
138
NSColor *c = [[NSColor blueColor ] colorWithAlphaComponent: 0.1 ];
139
139
0 commit comments