diff --git a/tests/Drivers/Gd/Modifiers/DrawPolygonModifierTest.php b/tests/Drivers/Gd/Modifiers/DrawPolygonModifierTest.php new file mode 100644 index 00000000..1b62a24a --- /dev/null +++ b/tests/Drivers/Gd/Modifiers/DrawPolygonModifierTest.php @@ -0,0 +1,28 @@ +createTestImage('trim.png'); + $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); + $drawable = new Polygon([new Point(0, 0), new Point(15, 15), new Point(20, 20)]); + $drawable->background('b53717'); + $image->modify(new DrawPolygonModifier($drawable)); + $this->assertEquals('b53717', $image->pickColor(14, 14)->toHex()); + } +} diff --git a/tests/Drivers/Imagick/Modifiers/DrawPolygonModifierTest.php b/tests/Drivers/Imagick/Modifiers/DrawPolygonModifierTest.php new file mode 100644 index 00000000..02ee6b2b --- /dev/null +++ b/tests/Drivers/Imagick/Modifiers/DrawPolygonModifierTest.php @@ -0,0 +1,24 @@ +createTestImage('trim.png'); + $this->assertEquals('00aef0', $image->pickColor(14, 14)->toHex()); + $drawable = new Polygon([new Point(0, 0), new Point(15, 15), new Point(20, 20)]); + $drawable->background('b53717'); + $image->modify(new DrawPolygonModifier($drawable)); + $this->assertEquals('b53717', $image->pickColor(14, 14)->toHex()); + } +}