Hi,

I'm doing some simple drawing (black Bezier curves and lines on a white background) to a custom view which inherits directly from NSView.

In - (LensView*)initWithFrame:(NSRect)frameRect  I have:

[self translateOriginToPoint:NSMakePoint( 20.0, (frameRect.size.height / 2) ) ]; [self scaleUnitSquareToSize:NSMakeSize( (frameRect.size.width / 30.0), (frameRect.size.width / 30.0) ) ]; // scale factor is around x25
        [NSBezierPath setDefaultLineWidth:0.0];

In - (void)drawRect:(NSRect)rect I have the usual:

        NSPath *path = //path creation stuff
        [path stroke];

This all works fine. However, while Cocoa (or Quartz) clearly IS anti- aliasing my curves and lines, it isn't, ummm, doing it very well. I still see jaggies (on my MacBook Pro, at slightly greater than normal viewing distance... say 50 cm (20 "). Now I've written anti-aliased Bezier curve drawing routines in assembler, so I thought I knew what to expect.

I'm surprised that the output on screen doesn't look better.

Are there any other settings I can adjust with regard to the anti- aliasing? (Not talking about flatness of Bezier curves here). Is this perhaps due to the floating point user space to device space conversion? and/or non pixel-perfect rendering?

It's just odd. The first time I saw the output, I just thought, "oh, I need to turn anti-aliasing on". Then I looked carefully, used the screen magnifier - and was a bit surprised that it WAS anti-aliased.

Thanks,

--colin
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to