summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2010-11-07 00:33:44 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2010-11-07 00:33:44 -0400
commit3abaea037dfeaf6fdaeae0b09728622448dc7785 (patch)
treee403821536f8b562e0a12191280fa5bfce49e5ae
parent8651e839a5923c8b490ee465c14ebac38213a2d1 (diff)
paths
-rw-r--r--region-iter.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/region-iter.c b/region-iter.c
index 29eb80a..9008242 100644
--- a/region-iter.c
+++ b/region-iter.c
@@ -708,5 +708,29 @@ main ()
dump_corners (corners, n_corners);
+ /* even more complex region */
+ pixman_region32_init_rect (&region, 0, 0, 100, 100);
+ pixman_region32_union_rect (&region, &region, 50, 50, 100, 100);
+ pixman_region32_union_rect (&region, &region, 200, 0, 50, 50);
+
+ printf ("-=- more complex path\n");
+
+ corners = region_path (&region, &n_corners);
+
+ dump_corners (corners, n_corners);
+
+ /* even more complex region */
+ pixman_region32_init_rect (&region, 0, 0, 100, 100);
+ pixman_region32_union_rect (&region, &region, 50, 50, 100, 100);
+ pixman_region32_union_rect (&region, &region, 150, 0, 50, 50);
+ pixman_region32_init_rect (&region2, 75, 75, 50, 50);
+ pixman_region32_subtract (&region, &region, &region2);
+
+ printf ("-=- more complex path\n");
+
+ corners = region_path (&region, &n_corners);
+
+ dump_corners (corners, n_corners);
+
return 0;
}