68ef999e73ad31620e4a73d8509ea8896d7a55e1
[ITKit.git] / ITImageCell.h
1 /*
2  *      ITKit
3  *      ITImageCell.h
4  *
5  *      Custom NSImageCell subclass that casts a shadow using CoreGraphics,
6  *              providing support for versions of Cocoa that don't have the NSShadow
7  *              class which was introduced in Mac OS X 10.3 (Panther), and also
8  *              provides smooth scaling.
9  *
10  *      Copyright (c) 2005 iThink Software
11  *
12  */
13
14 #import <Cocoa/Cocoa.h>
15
16 @interface ITImageCell : NSImageCell {
17         BOOL _scalesSmoothly;
18         BOOL castsShadow;
19         float shadowElevation;
20         float shadowAzimuth;
21         float shadowAmbient;
22         float shadowHeight;
23         float shadowRadius;
24         float shadowSaturation;
25 }
26
27 - (BOOL)scalesSmoothly;
28 - (void)setScalesSmoothly:(BOOL)flag;
29
30 - (BOOL)castsShadow;
31 - (void)setCastsShadow:(BOOL)newSetting;
32
33 - (float)shadowElevation; /* Light source elevation in degrees. Defaults to 45.0 */
34 - (void)setShadowElevation:(float)newElevation;
35
36 - (float)shadowAzimuth; /* Light source azimuth in degrees. Defaults to 90.0 */
37 - (void)setShadowAzimuth:(float)newAzimuth;
38
39 - (float)shadowAmbient; /* Amount of ambient light. Defaults to 0.15 */
40 - (void)setShadowAmbient:(float)newAmbient;
41
42 - (float)shadowHeight; /* Height above the canvas. Defaults to 1.0 */
43 - (void)setShadowHeight:(float)newHeight;
44
45 - (float)shadowRadius; /* Blur radius. Defaults to 4.0 */
46 - (void)setShadowRadius:(float)newRadius;
47
48 - (float)shadowSaturation; /* Maximum saturation. Defaults to 1.0 */
49 - (void)setShadowSaturation:(float)newSaturation;
50
51 @end