diff options
-rw-r--r-- | test/operator-source.c | 25 | ||||
-rw-r--r-- | test/operator-source.image16.ref.png | bin | 2756 -> 3959 bytes | |||
-rw-r--r-- | test/operator-source.pdf.rgb24.ref.png | bin | 3645 -> 0 bytes | |||
-rw-r--r-- | test/operator-source.quartz.argb32.ref.png | bin | 4936 -> 0 bytes | |||
-rw-r--r-- | test/operator-source.quartz.rgb24.ref.png | bin | 3771 -> 0 bytes | |||
-rw-r--r-- | test/operator-source.ref.png | bin | 4395 -> 5745 bytes | |||
-rw-r--r-- | test/operator-source.rgb24.ref.png | bin | 3231 -> 4639 bytes | |||
-rw-r--r-- | test/operator-source.svg12.argb32.xfail.png | bin | 2967 -> 0 bytes | |||
-rw-r--r-- | test/operator-source.svg12.rgb24.xfail.png | bin | 2976 -> 0 bytes | |||
-rw-r--r-- | test/operator-source.xlib-fallback.ref.png | bin | 3177 -> 4444 bytes | |||
-rw-r--r-- | test/operator-source.xlib.ref.png | bin | 4420 -> 5721 bytes | |||
-rw-r--r-- | test/operator-source.xlib.rgb24.ref.png | bin | 3201 -> 4447 bytes |
12 files changed, 21 insertions, 4 deletions
diff --git a/test/operator-source.c b/test/operator-source.c index d734167c..3dee5700 100644 --- a/test/operator-source.c +++ b/test/operator-source.c @@ -22,6 +22,7 @@ * * Authors: Kristian Høgsberg <krh@redhat.com> * Owen Taylor <otaylor@redhat.com> + * Uli Schlachter <psychon@znc.in> */ #include <math.h> @@ -145,12 +146,15 @@ draw_polygon (cairo_t *cr, int x, int y) } static void -draw_rects (cairo_t *cr, int x, int y) +draw_rects (cairo_t *cr, int x, int y, double offset) { - double block_width = (int)(0.33 * WIDTH + 0.5); - double block_height = (int)(0.33 * HEIGHT + 0.5); + double block_width = (int)(0.33 * WIDTH + 0.5) - offset/3; + double block_height = (int)(0.33 * HEIGHT + 0.5) - offset/3; int i, j; + x += offset/2; + y += offset/2; + for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) if ((i + j) % 2 == 0) @@ -161,6 +165,18 @@ draw_rects (cairo_t *cr, int x, int y) cairo_fill (cr); } +static void +draw_aligned_rects (cairo_t *cr, int x, int y) +{ + draw_rects (cr, x, y, 0); +} + +static void +draw_unaligned_rects (cairo_t *cr, int x, int y) +{ + draw_rects (cr, x, y, 2.1); +} + static void (* const pattern_funcs[])(cairo_t *cr, int x, int y) = { set_solid_pattern, set_translucent_pattern, @@ -172,7 +188,8 @@ static void (* const draw_funcs[])(cairo_t *cr, int x, int y) = { draw_mask, draw_glyphs, draw_polygon, - draw_rects + draw_aligned_rects, + draw_unaligned_rects }; #define IMAGE_WIDTH (ARRAY_LENGTH (pattern_funcs) * (WIDTH + PAD) + PAD) diff --git a/test/operator-source.image16.ref.png b/test/operator-source.image16.ref.png Binary files differindex 09173e0f..45562603 100644 --- a/test/operator-source.image16.ref.png +++ b/test/operator-source.image16.ref.png diff --git a/test/operator-source.pdf.rgb24.ref.png b/test/operator-source.pdf.rgb24.ref.png Binary files differdeleted file mode 100644 index 9482ed81..00000000 --- a/test/operator-source.pdf.rgb24.ref.png +++ /dev/null diff --git a/test/operator-source.quartz.argb32.ref.png b/test/operator-source.quartz.argb32.ref.png Binary files differdeleted file mode 100644 index 83d788c5..00000000 --- a/test/operator-source.quartz.argb32.ref.png +++ /dev/null diff --git a/test/operator-source.quartz.rgb24.ref.png b/test/operator-source.quartz.rgb24.ref.png Binary files differdeleted file mode 100644 index 038662f6..00000000 --- a/test/operator-source.quartz.rgb24.ref.png +++ /dev/null diff --git a/test/operator-source.ref.png b/test/operator-source.ref.png Binary files differindex 376a7070..c8a2b2e5 100644 --- a/test/operator-source.ref.png +++ b/test/operator-source.ref.png diff --git a/test/operator-source.rgb24.ref.png b/test/operator-source.rgb24.ref.png Binary files differindex 013d8a42..59ad7427 100644 --- a/test/operator-source.rgb24.ref.png +++ b/test/operator-source.rgb24.ref.png diff --git a/test/operator-source.svg12.argb32.xfail.png b/test/operator-source.svg12.argb32.xfail.png Binary files differdeleted file mode 100644 index ccf43156..00000000 --- a/test/operator-source.svg12.argb32.xfail.png +++ /dev/null diff --git a/test/operator-source.svg12.rgb24.xfail.png b/test/operator-source.svg12.rgb24.xfail.png Binary files differdeleted file mode 100644 index 827521b8..00000000 --- a/test/operator-source.svg12.rgb24.xfail.png +++ /dev/null diff --git a/test/operator-source.xlib-fallback.ref.png b/test/operator-source.xlib-fallback.ref.png Binary files differindex 79fb2c52..4527ce71 100644 --- a/test/operator-source.xlib-fallback.ref.png +++ b/test/operator-source.xlib-fallback.ref.png diff --git a/test/operator-source.xlib.ref.png b/test/operator-source.xlib.ref.png Binary files differindex 8e2f5e61..4732f52c 100644 --- a/test/operator-source.xlib.ref.png +++ b/test/operator-source.xlib.ref.png diff --git a/test/operator-source.xlib.rgb24.ref.png b/test/operator-source.xlib.rgb24.ref.png Binary files differindex a762d60a..09209afc 100644 --- a/test/operator-source.xlib.rgb24.ref.png +++ b/test/operator-source.xlib.rgb24.ref.png |