why setShouldAntialias: NO is not working?
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.