From 5e4f291f7d89fdf8c7058ca401bbc692cbbd9d21 Mon Sep 17 00:00:00 2001
From: Ryan Oldenburg <ryan@guzba.com>
Date: Fri, 18 Jun 2021 20:40:47 -0500
Subject: [PATCH] add test

---
 tests/images/paths/maskRectExcludeMask.png   | Bin 0 -> 208 bytes
 tests/images/paths/maskRectExcludeMaskAA.png | Bin 0 -> 237 bytes
 tests/images/paths/maskRectMask.png          | Bin 0 -> 208 bytes
 tests/images/paths/maskRectMaskAA.png        | Bin 0 -> 237 bytes
 tests/test_paths.nim                         |  24 +++++++++++++++++++
 5 files changed, 24 insertions(+)
 create mode 100644 tests/images/paths/maskRectExcludeMask.png
 create mode 100644 tests/images/paths/maskRectExcludeMaskAA.png
 create mode 100644 tests/images/paths/maskRectMask.png
 create mode 100644 tests/images/paths/maskRectMaskAA.png

diff --git a/tests/images/paths/maskRectExcludeMask.png b/tests/images/paths/maskRectExcludeMask.png
new file mode 100644
index 0000000000000000000000000000000000000000..d17c2b58aa780b1f92351364392363e16cc227db
GIT binary patch
literal 208
zcmeAS@N?(olHy`uVBq!ia0vp^DIm-NBp5<FPjvvP>7Fi*Ar*{oZ=B|8P+(xaxIq58
z{`yq5@EngLN9WYWNL5{|)Oo;>q<197WAbaQkiQmJd#3ca+sHVcX`R7sC=QZ1F)8Nd
zYz5x`Rmau)6rMRDBsz8q6f0UkS#@xZeD2xs+D9j5@7%@q-Sg4aug|VteR>sWz)jQe
oinshrF3Z`3Ju6^=7zfs6p5WBGW6|%5=^&?iy85}Sb4q9e0P<8+iU0rr

literal 0
HcmV?d00001

diff --git a/tests/images/paths/maskRectExcludeMaskAA.png b/tests/images/paths/maskRectExcludeMaskAA.png
new file mode 100644
index 0000000000000000000000000000000000000000..64db8caee3aa76add4f09e80fd542cccb95b8c4b
GIT binary patch
literal 237
zcmeAS@N?(olHy`uVBq!ia0vp^DIm-NBp5<FPjvvPEuJopAr*{oZyw}rGLUdc6lO1Q
zH#g8*z${_AS=QQs!QJbR_wNOn7JJ_N{rixS!F=7DozL-1>kMwsqTc)BCO)N`Cn@$v
z-&O7IcjhQoeC7m_G8Dh0dfnJU*yZ=Xg|>D=cjr29f(R$+9f|4KDF9M;Zo=#D|H|_}
zE!4FvaKBY^w%8*qvDCFjEqmQMop5oG!V`Tl7x(Sg{WU$T!g1R}0l3aHt!EgnU)fnz
RcLU^p22WQ%mvv4FO#p-WUP1r>

literal 0
HcmV?d00001

diff --git a/tests/images/paths/maskRectMask.png b/tests/images/paths/maskRectMask.png
new file mode 100644
index 0000000000000000000000000000000000000000..d17c2b58aa780b1f92351364392363e16cc227db
GIT binary patch
literal 208
zcmeAS@N?(olHy`uVBq!ia0vp^DIm-NBp5<FPjvvP>7Fi*Ar*{oZ=B|8P+(xaxIq58
z{`yq5@EngLN9WYWNL5{|)Oo;>q<197WAbaQkiQmJd#3ca+sHVcX`R7sC=QZ1F)8Nd
zYz5x`Rmau)6rMRDBsz8q6f0UkS#@xZeD2xs+D9j5@7%@q-Sg4aug|VteR>sWz)jQe
oinshrF3Z`3Ju6^=7zfs6p5WBGW6|%5=^&?iy85}Sb4q9e0P<8+iU0rr

literal 0
HcmV?d00001

diff --git a/tests/images/paths/maskRectMaskAA.png b/tests/images/paths/maskRectMaskAA.png
new file mode 100644
index 0000000000000000000000000000000000000000..64db8caee3aa76add4f09e80fd542cccb95b8c4b
GIT binary patch
literal 237
zcmeAS@N?(olHy`uVBq!ia0vp^DIm-NBp5<FPjvvPEuJopAr*{oZyw}rGLUdc6lO1Q
zH#g8*z${_AS=QQs!QJbR_wNOn7JJ_N{rixS!F=7DozL-1>kMwsqTc)BCO)N`Cn@$v
z-&O7IcjhQoeC7m_G8Dh0dfnJU*yZ=Xg|>D=cjr29f(R$+9f|4KDF9M;Zo=#D|H|_}
zE!4FvaKBY^w%8*qvDCFjEqmQMop5oG!V`Tl7x(Sg{WU$T!g1R}0l3aHt!EgnU)fnz
RcLU^p22WQ%mvv4FO#p-WUP1r>

literal 0
HcmV?d00001

diff --git a/tests/test_paths.nim b/tests/test_paths.nim
index e0b17e7..4f7894b 100644
--- a/tests/test_paths.nim
+++ b/tests/test_paths.nim
@@ -411,3 +411,27 @@ block:
     Paint(kind: pkSolid, color: rgbx(0, 255, 0, 255), blendMode: bmMask)
   )
   image.writeFile("tests/images/paths/rectMaskAA.png")
+
+block:
+  let mask = newMask(100, 100)
+  mask.fillPath("M 10 10 H 60 V 60 H 10 z")
+  mask.fillPath("M 30 30 H 80 V 80 H 30 z")#, blendMode = bmExcludeMask)
+  writeFile("tests/images/paths/maskRectExcludeMask.png", mask.encodePng())
+
+block:
+  let mask = newMask(100, 100)
+  mask.fillPath("M 10.1 10.1 H 60.1 V 60.1 H 10.1 z")
+  mask.fillPath("M 30.1 30.1 H 80.1 V 80.1 H 30.1 z")#, blendMode = bmExcludeMask)
+  writeFile("tests/images/paths/maskRectExcludeMaskAA.png", mask.encodePng())
+
+block:
+  let mask = newMask(100, 100)
+  mask.fillPath("M 10 10 H 60 V 60 H 10 z")
+  mask.fillPath("M 30 30 H 80 V 80 H 30 z")#, blendMode = bmMask)
+  writeFile("tests/images/paths/maskRectMask.png", mask.encodePng())
+
+block:
+  let mask = newMask(100, 100)
+  mask.fillPath("M 10.1 10.1 H 60.1 V 60.1 H 10.1 z")
+  mask.fillPath("M 30.1 30.1 H 80.1 V 80.1 H 30.1 z")#, blendMode = bmMask)
+  writeFile("tests/images/paths/maskRectMaskAA.png", mask.encodePng())