Hi, Matt,

Check out these posts -- it appears that you may not actually be doing anything wrong after all:

<http://www.cocoabuilder.com/archive/message/cocoa/2004/8/4/113656>
<http://www.cocoabuilder.com/archive/message/cocoa/2004/8/9/114100>

and this thread:

<http://www.cocoabuilder.com/archive/message/cocoa/2002/10/31/7501>

Good luck!

Cheers,
        Andrew

On May 20, 2008, at 9:33 PM, Matthew Tonkin wrote:

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 ([email protected])

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/andrew.merenbach%40ucla.edu

This email sent to [EMAIL PROTECTED]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list ([email protected])

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