summaryrefslogtreecommitdiff
path: root/src/cairo-fixed-private.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-04-29 22:12:02 +0200
committerBenjamin Otte <otte@redhat.com>2010-04-29 22:34:28 +0200
commit6d36f06751377459e35afe1ac26c59d33b16c730 (patch)
tree6d4c1a94bf7f8979a3c903b90f13db2f94cd9a6b /src/cairo-fixed-private.h
parent95179a5de91b5c6f99dbccc3b6c950df58d4f2a7 (diff)
image: Round down when rendering antialiased boxes
Matches Pixman's output when going via pixman_rasterize_trapezoid()
Diffstat (limited to 'src/cairo-fixed-private.h')
-rw-r--r--src/cairo-fixed-private.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cairo-fixed-private.h b/src/cairo-fixed-private.h
index 75ecc06dc..b30879438 100644
--- a/src/cairo-fixed-private.h
+++ b/src/cairo-fixed-private.h
@@ -166,6 +166,12 @@ _cairo_fixed_integer_round (cairo_fixed_t f)
}
static inline int
+_cairo_fixed_integer_round_down (cairo_fixed_t f)
+{
+ return (f + CAIRO_FIXED_FRAC_MASK/2) >> CAIRO_FIXED_FRAC_BITS;
+}
+
+static inline int
_cairo_fixed_fractional_part (cairo_fixed_t f)
{
return f & CAIRO_FIXED_FRAC_MASK;