Hi All,

I'm trying to print a NSGradient or CTGradient that comprises two colors with alpha. It draws fine on screen, and draws fine in the print panel preview, but when I create a PDF or print it, the alpha is not respected at all.

Here is my drawing code:

- (void)drawRect:(NSRect)rect {
    // Drawing code here.
        
        [[NSColor blueColor] set];
        NSRectFill(rect);
        
NSGradient *gradient = [[NSGradient alloc] initWithStartingColor: [NSColor clearColor] endingColor:[NSColor colorWithCalibratedWhite:1.0 alpha:0.5]];
        [gradient drawInRect:NSInsetRect([self bounds], 5, 5) angle:90.0];
        [gradient release];
}


You can check out how it looks on screen and in print here: 
http://skitch.com/mattski/m78t/window

Any help would be greatly appreciated.

Thanks,

Matt Tonkin
NovaMind Software
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to