Re: Strange issue in stroking a bezier path
Re: Strange issue in stroking a bezier path
- Subject: Re: Strange issue in stroking a bezier path
- From: Peter Teeson <email@hidden>
- Date: Tue, 08 May 2012 12:19:16 -0400
On 2012-05-05, at 7:55 PM, Kyle Sluder wrote:
> On May 5, 2012, at 4:46 PM, Jens Alfke <email@hidden> wrote:
>>
>> (IIRC there are some AppKit geometry utility functions that will adjust coordinate values to fit pixel boundaries in a resolution-independent way. I don’t remember their names offhand.)
> -centerScanRect:, -convertRectToBacking: and friends. Which if I understand correctly you should now *always* use instead of adding half pixels because of HiDPI.
>> Someday every device will have retina-quality graphics and these details won’t matter
> It still matters because coordinates in Quartz always refer to the infinitely thin space between device pixels.
>
> --Kyle Sluder
Thanks very much Jens and Kyle and everyone who contributed. Most valuable. From now on I'll be using the
the NSView -convertPointFrom/To and -convertRectTo/From methods in their various forms.
As for NSView's -centerScanRect I will try to understand where that should be used by examining the code examples.
Also NSScreen -convertRectToBacking and-convertRectFromBacking methods as appropriate.
This is my first time digging deeply into graphics. My previous work was primarily DB, network and IOKit related.
THanks again and
respect….
Peter
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden