-/*************************************************************************/
-#pragma mark -
-#pragma mark DRAWING METHODS
-/*************************************************************************/
-
-- (void)drawRect:(NSRect)rect
-{
- CGSGenericObj style = nil;
- CGShadowStyle shadow;
-
- if ( castsShadow ) {
- // Create the shadow style to use for drawing the string
- shadow.version = 0;
- shadow.elevation = shadowElevation;
- shadow.azimuth = shadowAzimuth;
- shadow.ambient = shadowAmbient;
- shadow.height = shadowHeight;
- shadow.radius = shadowRadius;
- shadow.saturation = shadowSaturation;
- style = CGStyleCreateShadow(&shadow);
-
- // Set the context for drawing the string
- [NSGraphicsContext saveGraphicsState];
- CGContextSetStyle([[NSGraphicsContext currentContext] graphicsPort], style);
- }
-
- // Draw the string
- [super drawRect:rect];
-
-
- if ( castsShadow ) {
- // Restore the old context
- [NSGraphicsContext restoreGraphicsState];
- CGStyleRelease(style);
- }
-}
-
-
-