[gegl] tests: add a test case for gegl_buffer_set_pattern



commit 66895a297d8906873fc7b3648de06b3e4c3b3416
Author: Téo Mazars <teomazars gmail com>
Date:   Thu Nov 21 14:08:15 2013 +0100

    tests: add a test case for gegl_buffer_set_pattern

 .../reference/test_gegl_buffer_set_pattern.buf     | 1057 ++++++++++++++++++++
 tests/buffer/tests/test_gegl_buffer_set_pattern.c  |   55 +
 2 files changed, 1112 insertions(+), 0 deletions(-)
---
diff --git a/tests/buffer/reference/test_gegl_buffer_set_pattern.buf 
b/tests/buffer/reference/test_gegl_buffer_set_pattern.buf
new file mode 100644
index 0000000..e893643
--- /dev/null
+++ b/tests/buffer/reference/test_gegl_buffer_set_pattern.buf
@@ -0,0 +1,1057 @@
+Test: test_gegl_buffer_set_pattern
+
+pattern: (0 0 5 5)
+buffer: (0 0 20 20)
+offsets: (0 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (-1 -2 2 3)
+buffer: (0 0 20 20)
+offsets: (0 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 3 2)
+buffer: (0 0 20 20)
+offsets: (0 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 5 5)
+buffer: (1 -1 10 7)
+offsets: (0 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌▓▓▓▓▓▓▓▓▓▓▐
+▌          ▐
+▌░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▐
+▌          ▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (-1 -2 2 3)
+buffer: (1 -1 10 7)
+offsets: (0 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▐
+▌          ▐
+▌░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▐
+▌          ▐
+▌░░░░░░░░░░▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 3 2)
+buffer: (1 -1 10 7)
+offsets: (0 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌          ▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌          ▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌          ▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌░▓ ░▓ ░▓ ░▐
+▌░▓ ░▓ ░▓ ░▐
+▌░▓ ░▓ ░▓ ░▐
+▌░▓ ░▓ ░▓ ░▐
+▌░▓ ░▓ ░▓ ░▐
+▌░▓ ░▓ ░▓ ░▐
+▌░▓ ░▓ ░▓ ░▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 5 5)
+buffer: (-1 -2 2 2)
+offsets: (0 0)
+Vertical gradient
+▛▀▀▜
+▌▒▒▐
+▌▓▓▐
+▙▄▄▟
+Horizontal gradient
+▛▀▀▜
+▌▓ ▐
+▌▓ ▐
+▙▄▄▟
+
+pattern: (-1 -2 2 3)
+buffer: (-1 -2 2 2)
+offsets: (0 0)
+Vertical gradient
+▛▀▀▜
+▌  ▐
+▌░░▐
+▙▄▄▟
+Horizontal gradient
+▛▀▀▜
+▌ ▒▐
+▌ ▒▐
+▙▄▄▟
+
+pattern: (0 0 3 2)
+buffer: (-1 -2 2 2)
+offsets: (0 0)
+Vertical gradient
+▛▀▀▜
+▌  ▐
+▌▒▒▐
+▙▄▄▟
+Horizontal gradient
+▛▀▀▜
+▌▓ ▐
+▌▓ ▐
+▙▄▄▟
+
+pattern: (0 0 5 5)
+buffer: (0 0 20 20)
+offsets: (1 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▌▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (-1 -2 2 3)
+buffer: (0 0 20 20)
+offsets: (1 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 3 2)
+buffer: (0 0 20 20)
+offsets: (1 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 5 5)
+buffer: (1 -1 10 7)
+offsets: (1 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌▓▓▓▓▓▓▓▓▓▓▐
+▌          ▐
+▌░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▐
+▌          ▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (-1 -2 2 3)
+buffer: (1 -1 10 7)
+offsets: (1 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▐
+▌          ▐
+▌░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▐
+▌          ▐
+▌░░░░░░░░░░▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 3 2)
+buffer: (1 -1 10 7)
+offsets: (1 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌          ▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌          ▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌          ▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌ ░▓ ░▓ ░▓ ▐
+▌ ░▓ ░▓ ░▓ ▐
+▌ ░▓ ░▓ ░▓ ▐
+▌ ░▓ ░▓ ░▓ ▐
+▌ ░▓ ░▓ ░▓ ▐
+▌ ░▓ ░▓ ░▓ ▐
+▌ ░▓ ░▓ ░▓ ▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 5 5)
+buffer: (-1 -2 2 2)
+offsets: (1 0)
+Vertical gradient
+▛▀▀▜
+▌▒▒▐
+▌▓▓▐
+▙▄▄▟
+Horizontal gradient
+▛▀▀▜
+▌▒▓▐
+▌▒▓▐
+▙▄▄▟
+
+pattern: (-1 -2 2 3)
+buffer: (-1 -2 2 2)
+offsets: (1 0)
+Vertical gradient
+▛▀▀▜
+▌  ▐
+▌░░▐
+▙▄▄▟
+Horizontal gradient
+▛▀▀▜
+▌▒ ▐
+▌▒ ▐
+▙▄▄▟
+
+pattern: (0 0 3 2)
+buffer: (-1 -2 2 2)
+offsets: (1 0)
+Vertical gradient
+▛▀▀▜
+▌  ▐
+▌▒▒▐
+▙▄▄▟
+Horizontal gradient
+▛▀▀▜
+▌░▓▐
+▌░▓▐
+▙▄▄▟
+
+pattern: (0 0 5 5)
+buffer: (0 0 20 20)
+offsets: (0 -1)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▌ ░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (-1 -2 2 3)
+buffer: (0 0 20 20)
+offsets: (0 -1)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 3 2)
+buffer: (0 0 20 20)
+offsets: (0 -1)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▌ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 5 5)
+buffer: (1 -1 10 7)
+offsets: (0 -1)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌          ▐
+▌░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▐
+▌          ▐
+▌░░░░░░░░░░▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (-1 -2 2 3)
+buffer: (1 -1 10 7)
+offsets: (0 -1)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌▓▓▓▓▓▓▓▓▓▓▐
+▌          ▐
+▌░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▐
+▌          ▐
+▌░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 3 2)
+buffer: (1 -1 10 7)
+offsets: (0 -1)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌          ▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌          ▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌          ▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌          ▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌░▓ ░▓ ░▓ ░▐
+▌░▓ ░▓ ░▓ ░▐
+▌░▓ ░▓ ░▓ ░▐
+▌░▓ ░▓ ░▓ ░▐
+▌░▓ ░▓ ░▓ ░▐
+▌░▓ ░▓ ░▓ ░▐
+▌░▓ ░▓ ░▓ ░▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 5 5)
+buffer: (-1 -2 2 2)
+offsets: (0 -1)
+Vertical gradient
+▛▀▀▜
+▌▓▓▐
+▌  ▐
+▙▄▄▟
+Horizontal gradient
+▛▀▀▜
+▌▓ ▐
+▌▓ ▐
+▙▄▄▟
+
+pattern: (-1 -2 2 3)
+buffer: (-1 -2 2 2)
+offsets: (0 -1)
+Vertical gradient
+▛▀▀▜
+▌░░▐
+▌▓▓▐
+▙▄▄▟
+Horizontal gradient
+▛▀▀▜
+▌ ▒▐
+▌ ▒▐
+▙▄▄▟
+
+pattern: (0 0 3 2)
+buffer: (-1 -2 2 2)
+offsets: (0 -1)
+Vertical gradient
+▛▀▀▜
+▌▒▒▐
+▌  ▐
+▙▄▄▟
+Horizontal gradient
+▛▀▀▜
+▌▓ ▐
+▌▓ ▐
+▙▄▄▟
+
+pattern: (0 0 5 5)
+buffer: (0 0 20 20)
+offsets: (4 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▌░▒▒▓ ░▒▒▓ ░▒▒▓ ░▒▒▓ ▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (-1 -2 2 3)
+buffer: (0 0 20 20)
+offsets: (4 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▌░░░░░░░░░░░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▐
+▌                    ▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▌▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 3 2)
+buffer: (0 0 20 20)
+offsets: (4 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▌                    ▐
+▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▌▓ ░▓ ░▓ ░▓ ░▓ ░▓ ░▓ ▐
+▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 5 5)
+buffer: (1 -1 10 7)
+offsets: (4 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌▓▓▓▓▓▓▓▓▓▓▐
+▌          ▐
+▌░░░░░░░░░░▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌▓▓▓▓▓▓▓▓▓▓▐
+▌          ▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌▒▒▓ ░▒▒▓ ░▐
+▌▒▒▓ ░▒▒▓ ░▐
+▌▒▒▓ ░▒▒▓ ░▐
+▌▒▒▓ ░▒▒▓ ░▐
+▌▒▒▓ ░▒▒▓ ░▐
+▌▒▒▓ ░▒▒▓ ░▐
+▌▒▒▓ ░▒▒▓ ░▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (-1 -2 2 3)
+buffer: (1 -1 10 7)
+offsets: (4 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▐
+▌          ▐
+▌░░░░░░░░░░▐
+▌▓▓▓▓▓▓▓▓▓▓▐
+▌          ▐
+▌░░░░░░░░░░▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▌ ▒ ▒ ▒ ▒ ▒▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 3 2)
+buffer: (1 -1 10 7)
+offsets: (4 0)
+Vertical gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌          ▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌          ▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▌          ▐
+▌▒▒▒▒▒▒▒▒▒▒▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+Horizontal gradient
+▛▀▀▀▀▀▀▀▀▀▀▜
+▌ ░▓ ░▓ ░▓ ▐
+▌ ░▓ ░▓ ░▓ ▐
+▌ ░▓ ░▓ ░▓ ▐
+▌ ░▓ ░▓ ░▓ ▐
+▌ ░▓ ░▓ ░▓ ▐
+▌ ░▓ ░▓ ░▓ ▐
+▌ ░▓ ░▓ ░▓ ▐
+▙▄▄▄▄▄▄▄▄▄▄▟
+
+pattern: (0 0 5 5)
+buffer: (-1 -2 2 2)
+offsets: (4 0)
+Vertical gradient
+▛▀▀▜
+▌▒▒▐
+▌▓▓▐
+▙▄▄▟
+Horizontal gradient
+▛▀▀▜
+▌ ░▐
+▌ ░▐
+▙▄▄▟
+
+pattern: (-1 -2 2 3)
+buffer: (-1 -2 2 2)
+offsets: (4 0)
+Vertical gradient
+▛▀▀▜
+▌  ▐
+▌░░▐
+▙▄▄▟
+Horizontal gradient
+▛▀▀▜
+▌ ▒▐
+▌ ▒▐
+▙▄▄▟
+
+pattern: (0 0 3 2)
+buffer: (-1 -2 2 2)
+offsets: (4 0)
+Vertical gradient
+▛▀▀▜
+▌  ▐
+▌▒▒▐
+▙▄▄▟
+Horizontal gradient
+▛▀▀▜
+▌░▓▐
+▌░▓▐
+▙▄▄▟
diff --git a/tests/buffer/tests/test_gegl_buffer_set_pattern.c 
b/tests/buffer/tests/test_gegl_buffer_set_pattern.c
new file mode 100644
index 0000000..cfb5c07
--- /dev/null
+++ b/tests/buffer/tests/test_gegl_buffer_set_pattern.c
@@ -0,0 +1,55 @@
+TEST ()
+{
+  gint i, j, k;
+  GeglBuffer    *pattern, *output;
+  GeglRectangle  pat_extent[3]    = {{0, 0, 5, 5},
+                                     {-1, -2, 2, 3},
+                                     {0, 0, 3, 2}};
+
+  GeglRectangle  output_extent[3] = {{0, 0, 20, 20},
+                                     {1, -1, 10, 7},
+                                     {-1, -2, 2, 2}};
+
+  gint offsets[4][2] = {{0, 0}, {1, 0}, {0, -1}, {4, 0}};
+
+  test_start ();
+
+  for (i = 0; i < G_N_ELEMENTS(offsets); ++i)
+    for (j = 0; j < G_N_ELEMENTS(output_extent); ++j)
+      for (k = 0; k < G_N_ELEMENTS(pat_extent); ++k)
+        {
+          GeglRectangle *current_pat_extent = pat_extent + k;
+          GeglRectangle *current_output_extent = output_extent + j;
+          gint           offset_x = offsets[i][0];
+          gint           offset_y = offsets[i][1];
+
+          pattern = gegl_buffer_new (current_pat_extent,    babl_format ("Y float"));
+          output  = gegl_buffer_new (current_output_extent, babl_format ("Y float"));
+
+          vgrad (pattern);
+
+          gegl_buffer_set_pattern (output, NULL, pattern, offset_x, offset_y);
+
+          print(("\npattern: (%d %d %d %d)\nbuffer: (%d %d %d %d)\noffsets: (%d %d)\n",
+                 current_pat_extent->x, current_pat_extent->y,
+                 current_pat_extent->width, current_pat_extent->height,
+                 current_output_extent->x, current_output_extent->y,
+                 current_output_extent->width, current_output_extent->height,
+                 offset_x, offset_y));
+
+          print(("Vertical gradient\n"));
+          print_buffer (output);
+
+
+          hgrad (pattern);
+          gegl_buffer_set_pattern (output, NULL, pattern, offset_x, offset_y);
+
+          print(("Horizontal gradient\n"));
+          print_buffer (output);
+
+          g_object_unref (pattern);
+          g_object_unref (output);
+        }
+
+  test_end ();
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]