Removing the use of private CoreGraphics APIs to draw shadows, and replacing with...
[ITKit.git] / ITImageView.m
1 #import "ITImageView.h"
2 #import "ITImageCell.h"
3
4 @implementation ITImageView
5
6 + (void)initialize {
7         if (self == [ITImageView class]) {
8                 [self setCellClass:[ITImageCell class]];
9         }
10 }
11
12 + (Class)cellClass {
13         return [ITImageCell class];
14 }
15
16 - (id)initWithFrame:(NSRect)rect {
17         if ((self = [super initWithFrame:rect])) {
18                 [self setScalesSmoothly:YES];
19         }
20         return self;
21 }
22
23 - (BOOL)scalesSmoothly {
24         return [[self cell] scalesSmoothly];
25 }
26
27 - (void)setScalesSmoothly:(BOOL)flag {
28         [[self cell] setScalesSmoothly:flag];
29 }
30
31 - (BOOL)castsShadow {
32         return [[self cell] castsShadow];
33 }
34
35 - (void)setCastsShadow:(BOOL)newSetting {
36         [[self cell] setCastsShadow:newSetting];
37 }
38
39 - (float)shadowElevation {
40         return [[self cell] shadowElevation];
41 }
42
43 - (void)setShadowElevation:(float)newElevation {
44         [[self cell] setShadowElevation:newElevation];
45 }
46
47 - (float)shadowAzimuth {
48         return [[self cell] shadowAzimuth];
49 }
50
51 - (void)setShadowAzimuth:(float)newAzimuth {
52         [[self cell] setShadowAzimuth:newAzimuth];
53 }
54
55 - (float)shadowAmbient {
56         return [[self cell] shadowAmbient];
57 }
58
59 - (void)setShadowAmbient:(float)newAmbient {
60         [[self cell] setShadowAmbient:newAmbient];
61 }
62
63 - (float)shadowHeight {
64         return [[self cell] shadowHeight];
65 }
66
67 - (void)setShadowHeight:(float)newHeight {
68         [[self cell] setShadowHeight:newHeight];
69 }
70
71 - (float)shadowRadius {
72         return [[self cell] shadowRadius];
73 }
74
75 - (void)setShadowRadius:(float)newRadius {
76         [[self cell] setShadowRadius:newRadius];
77 }
78
79 - (float)shadowSaturation {
80         return [[self cell] shadowSaturation];
81 }
82
83 - (void)setShadowSaturation:(float)newSaturation {
84         [[self cell] setShadowSaturation:newSaturation];
85 }
86
87 @end