• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Antialiasing and printing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: [OT] Encryption
  • Next by Date: Re: Allocation during awakeFromNib
  • Previous by thread: Zones
  • Next by thread: RE: Converting NSString to char constant (answered)
  • Index(es):
    • Date
    • Thread