[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Graphics Rounding (was Re: Pixel-aligned autoresizing)
From: |
Eric Wasylishen |
Subject: |
Re: Graphics Rounding (was Re: Pixel-aligned autoresizing) |
Date: |
Tue, 12 Jul 2011 15:18:24 -0600 |
Hi,
I committed the change which I proposed earlier, introducing the following in
GSGuiPrivate.h:
/**
* Rounds to the nearest integer, and in the case of ties, round to the
* larger integer. This is the recommended rounding function for rounding
* graphics points.
*
* For example:
* GSRoundTowardsInfinity(0.8) == 1.0
* GSRoundTowardsInfinity(0.5) == 1.0
* GSRoundTowardsInfinity(0.1) == 0.0
* GSRoundTowardsInfinity(-2.5) == -2.0
*/
static inline CGFloat GSRoundTowardsInfinity(CGFloat x)
{
return floor(x + 0.5);
}
and switching uses of rint[f] to this function. The jumping buttons in
SimpleAgenda are fixed now.
Eric
- Re: Pixel-aligned autoresizing, (continued)
- 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
- Re: Graphics Rounding (was Re: Pixel-aligned autoresizing), Fred Kiefer, 2011/07/10
- Re: Graphics Rounding (was Re: Pixel-aligned autoresizing), Eric Wasylishen, 2011/07/10
- Re: Graphics Rounding (was Re: Pixel-aligned autoresizing), Riccardo Mottola, 2011/07/11
- Re: Graphics Rounding (was Re: Pixel-aligned autoresizing), Eric Wasylishen, 2011/07/11
- Re: Graphics Rounding (was Re: Pixel-aligned autoresizing), Tim Schmielau, 2011/07/11
- Re: Graphics Rounding (was Re: Pixel-aligned autoresizing), Riccardo Mottola, 2011/07/12
- Re: Graphics Rounding (was Re: Pixel-aligned autoresizing), Philippe Roussel, 2011/07/11
- Re: Graphics Rounding (was Re: Pixel-aligned autoresizing),
Eric Wasylishen <=
- Re: Graphics Rounding (was Re: Pixel-aligned autoresizing), Philippe Roussel, 2011/07/13
- Re: Graphics Rounding (was Re: Pixel-aligned autoresizing), David Chisnall, 2011/07/20
- autoresizing in the case of negative flexible space (was Re: Pixel-aligned autoresizing), Tim Schmielau, 2011/07/22
- Re: autoresizing in the case of negative flexible space (was Re: Pixel-aligned autoresizing), Fred Kiefer, 2011/07/23
- Re: autoresizing in the case of negative flexible space (was Re: Pixel-aligned autoresizing), Tim Schmielau, 2011/07/23