• 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
why setShouldAntialias: NO is not working?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

why setShouldAntialias: NO is not working?


  • Subject: why setShouldAntialias: NO is not working?
  • From: jerome LAURENS <email@hidden>
  • Date: Wed, 26 Jun 2002 17:27:20 +0200

Hi,

I've got a NSTextView subclass which drawRect: method does not want anti aliasing:

- (void) drawRect: (NSRect) aRect;
{
Bool saved = [[NSGraphicsContext currentContext] shouldAntialias];
[[NSGraphicsContext currentContext] setShouldAntialias: NO];
NSLog(([[NSGraphicsContext currentContext] shouldAntialias]? @"1-Y": @"1-N"));
[super drawRect: aRect];
NSLog(([[NSGraphicsContext currentContext] shouldAntialias]? @"2-Y": @"2-N"));
[[NSGraphicsContext currentContext] setShouldAntialias: saved];
return;
}

antialiasing is turned off quite all the time. BUT sometimes, antialiasing is on as I make some text operation (I do not know exactly which op caused the problem). If I take a look at the logs, I can see that "1-Y" is never logged, but "2-Y" are logged when the problem occured. It means that NSTextView's drawRect: sometimes changes the graphics context. How is it possible?

I am afraid I used the wrong code to turn off antialiasing, any hints, pointer to samples...

TIA
_______________________________________________
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: Are undo method arguments retained?
  • Next by Date: Re: WYSIWYG Font Menu
  • Previous by thread: Are undo method arguments retained?
  • Next by thread: Re: WYSIWYG Font Menu
  • Index(es):
    • Date
    • Thread