mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 08:48:00 +02:00
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:
parent
dffdbd8515
commit
b9f0c4b252
1 changed files with 2 additions and 4 deletions
|
|
@ -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.)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue