[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Graphics Rounding (was Re: Pixel-aligned autoresizing)
From: |
Philippe Roussel |
Subject: |
Re: Graphics Rounding (was Re: Pixel-aligned autoresizing) |
Date: |
Wed, 13 Jul 2011 09:14:43 +0200 |
Le mardi 12 juillet 2011 à 15:18 -0600, Eric Wasylishen a écrit :
> 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.
Thanks a lot for your work Eric.
Philippe
- Re: Pixel-aligned autoresizing, (continued)
- 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, 2011/07/12
- Re: Graphics Rounding (was Re: Pixel-aligned autoresizing),
Philippe Roussel <=
- 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