Antialiasing and printing
Antialiasing and printing
- Subject: Antialiasing and printing
- From: Robert Borsuk <email@hidden>
- Date: Fri, 2 Jan 2004 17:08:25 -0500
Hi All,
I currently draw into an image and then copy that image into my view
on a window using the following code:
//from the drawRect of my custom view
- (void)drawRect:(NSRect)rect
{
if (testImage!=nil)
{
if (aliasState==0)
{
[[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationNone];
[[NSGraphicsContext currentContext] setShouldAntialias:NO];
}
else
{
[[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationDefault];
[[NSGraphicsContext currentContext] setShouldAntialias:YES];
}
[testImage drawInRect:rect fromRect:NSMakeRect(0,0,[testImage
size].width, [testImage size].height)
operation:NSCompositeCopy fraction:1.0];
}
}
The code also allows me to turn off antialiasing. This makes my image
come out nice and sharp. My problem now is that when I go to print the
view using:
-(IBAction)print:(id)sender
{
NSPrintInfo *printInfo=[NSPrintInfo sharedPrintInfo];
NSPrintOperation *printOp;
printOp=[NSPrintOperation printOperationWithView:myCustomView
printInfo:printInfo];
[printOp setShowPanels:YES];
[printOp runOperation];
}
My print out is using antialiasing. Is there a way to turn off
antialiasing of a printed view? Or am I doing something else wrong?
Thanks
Rob
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.