Use _cairo_round() instead of round()

MSVC doesn't have round() and the code probably wants
to round in the same direction regardless of whether
the values are negative or positive.
This commit is contained in:
Jeff Muizelaar 2009-02-10 17:57:00 -05:00
parent dffdbd8515
commit b9f0c4b252

View file

@ -34,8 +34,6 @@
* Behdad Esfahbod <behdad@behdad.org>
*/
#define _ISOC99_SOURCE /* for round() */
#include "cairoint.h"
#include <math.h>
@ -255,8 +253,8 @@ compute_hinting_scales (cairo_t *cr,
compute_hinting_scale (cr, x, y, y_scale, y_scale_inv);
}
#define SNAPXI(p) (round ((p) * x_scale) * x_scale_inv)
#define SNAPYI(p) (round ((p) * y_scale) * y_scale_inv)
#define SNAPXI(p) (_cairo_round ((p) * x_scale) * x_scale_inv)
#define SNAPYI(p) (_cairo_round ((p) * y_scale) * y_scale_inv)
/* This controls the global font size */
#define F(g) ((g) / 72.)