[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pixel-aligned autoresizing
From: |
Jens Ayton |
Subject: |
Re: Pixel-aligned autoresizing |
Date: |
Wed, 6 Jul 2011 10:54:28 +0200 |
On Jul 6, 2011, at 10:32, Fred Kiefer wrote:
>
> Basically wee need to ensure that all drawing operations that are
> initiated by the gui drawing code get pixel aligned. Somebody will have
> to test whether this is true for all drawing operations, that is, when I
> use an NSBezierPath with fractional coordinates to draw into a NSView,
> will the result be blurred?
Yes, Cocoa NSBezierPath supports subpixel positioning. In fact, the most common
question from beginners is why one-pixel rectangles at integer coordinates are
drawn two pixels wide, and this is the answer.
Developers writing custom views are expected to use -centerScanRect: and
related coordinate transform functions to ensure grid-aligned drawing under
transformation and UI scaling, and I assume the standard views do too.
--
Jens Ayton
- Pixel-aligned autoresizing, Eric Wasylishen, 2011/07/05
- Re: Pixel-aligned autoresizing, Fred Kiefer, 2011/07/06
- Re: Pixel-aligned autoresizing,
Jens Ayton <=
- Re: Pixel-aligned autoresizing, Eric Wasylishen, 2011/07/06
- Re: Pixel-aligned autoresizing, Fred Kiefer, 2011/07/06
- Re: Pixel-aligned autoresizing, Eric Wasylishen, 2011/07/07
- Re: Pixel-aligned autoresizing, Fred Kiefer, 2011/07/07
- Re: Pixel-aligned autoresizing, Eric Wasylishen, 2011/07/08
- Re: Pixel-aligned autoresizing, Fred Kiefer, 2011/07/08
- Re: Pixel-aligned autoresizing, Eric Wasylishen, 2011/07/08
- Re: Pixel-aligned autoresizing, Fred Kiefer, 2011/07/08
- Re: Pixel-aligned autoresizing, Philippe Roussel, 2011/07/09
- Graphics Rounding (was Re: Pixel-aligned autoresizing), Eric Wasylishen, 2011/07/09