Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add unit tests for Pixel Blend Operations.

  • Loading branch information...
commit 1c636b0375983b8ca9907b09c045ef4a2e0e7f53 1 parent 47542d6
Jonathan Pobst authored December 30, 2012

Showing 47 changed files with 1,034 additions and 0 deletions. Show diff stats Hide diff stats

  1. 66  Pinta.ImageManipulation.UnitTests/BlendOperations/AdditiveBlendOpTest.cs
  2. 66  Pinta.ImageManipulation.UnitTests/BlendOperations/ColorBurnBlendOpTest.cs
  3. 66  Pinta.ImageManipulation.UnitTests/BlendOperations/ColorDodgeBlendOpTest.cs
  4. 66  Pinta.ImageManipulation.UnitTests/BlendOperations/DarkenBlendOpTest.cs
  5. 66  Pinta.ImageManipulation.UnitTests/BlendOperations/DifferenceBlendOpTest.cs
  6. 66  Pinta.ImageManipulation.UnitTests/BlendOperations/GlowBlendOpTest.cs
  7. 66  Pinta.ImageManipulation.UnitTests/BlendOperations/LightenBlendOpTest.cs
  8. 66  Pinta.ImageManipulation.UnitTests/BlendOperations/MultiplyBlendOpTest.cs
  9. 66  Pinta.ImageManipulation.UnitTests/BlendOperations/NegationBlendOpTest.cs
  10. 66  Pinta.ImageManipulation.UnitTests/BlendOperations/NormalBlendOpTest.cs
  11. 66  Pinta.ImageManipulation.UnitTests/BlendOperations/OverlayBlendOpTest.cs
  12. 66  Pinta.ImageManipulation.UnitTests/BlendOperations/ReflectBlendOpTest.cs
  13. 66  Pinta.ImageManipulation.UnitTests/BlendOperations/ScreenBlendOpTest.cs
  14. 66  Pinta.ImageManipulation.UnitTests/BlendOperations/XorBlendOpTest.cs
  15. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/additiveblend1.png
  16. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/additiveblend2.png
  17. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/colorblend1.png
  18. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/colorblend2.png
  19. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/colorburnblend1.png
  20. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/colorburnblend2.png
  21. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/colordodgeblend1.png
  22. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/colordodgeblend2.png
  23. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/darkenblend1.png
  24. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/darkenblend2.png
  25. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/differenceblend1.png
  26. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/differenceblend2.png
  27. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/glowblend1.png
  28. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/glowblend2.png
  29. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/lightenblend1.png
  30. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/lightenblend2.png
  31. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/multiplyblend1.png
  32. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/multiplyblend2.png
  33. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/negationblend1.png
  34. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/negationblend2.png
  35. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/normalblend1.png
  36. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/normalblend2.png
  37. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/overlayblend1.png
  38. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/overlayblend2.png
  39. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/reflectblend1.png
  40. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/reflectblend2.png
  41. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/screenblend1.png
  42. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/screenblend2.png
  43. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/xorblend1.png
  44. BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/xorblend2.png
  45. 110  Pinta.ImageManipulation.UnitTests/Pinta.ImageManipulation.UnitTests.csproj
  46. BIN  Pinta.ImageManipulation.UnitTests/SourceBitmaps/blend1.png
  47. BIN  Pinta.ImageManipulation.UnitTests/SourceBitmaps/blend2.png
66  Pinta.ImageManipulation.UnitTests/BlendOperations/AdditiveBlendOpTest.cs
... ...
@@ -0,0 +1,66 @@
  1
+// 
  2
+// AdditiveBlendOpTest.cs
  3
+//  
  4
+// Author:
  5
+//       Jonathan Pobst <monkey@jpobst.com>
  6
+// 
  7
+// Copyright (c) 2012 Jonathan Pobst
  8
+// 
  9
+// Permission is hereby granted, free of charge, to any person obtaining a copy
  10
+// of this software and associated documentation files (the "Software"), to deal
  11
+// in the Software without restriction, including without limitation the rights
  12
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13
+// copies of the Software, and to permit persons to whom the Software is
  14
+// furnished to do so, subject to the following conditions:
  15
+// 
  16
+// The above copyright notice and this permission notice shall be included in
  17
+// all copies or substantial portions of the Software.
  18
+// 
  19
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25
+// THE SOFTWARE.
  26
+
  27
+using System;
  28
+using Microsoft.VisualStudio.TestTools.UnitTesting;
  29
+using Pinta.ImageManipulation.PixelBlendOperations;
  30
+
  31
+namespace Pinta.ImageManipulation.UnitTests.BlendOperations
  32
+{
  33
+	[TestClass]
  34
+	public class AdditiveBlendOpTest : BaseTest
  35
+	{
  36
+		[TestMethod]
  37
+		public void AdditiveBlendOp1 ()
  38
+		{
  39
+			var lhs = GetSourceImage ("blend1.png");
  40
+			var rhs = GetSourceImage ("blend2.png");
  41
+
  42
+			var lhs_wrap = new BitmapWrapper (lhs);
  43
+			var rhs_wrap = new BitmapWrapper (rhs);
  44
+
  45
+			var op = new AdditiveBlendOp ();
  46
+			op.Apply (lhs_wrap, rhs_wrap);
  47
+
  48
+			Compare (rhs, "additiveblend1.png");
  49
+		}
  50
+
  51
+		[TestMethod]
  52
+		public void AdditiveBlendOp2 ()
  53
+		{
  54
+			var lhs = GetSourceImage ("blend1.png");
  55
+			var rhs = GetSourceImage ("blend2.png");
  56
+
  57
+			var lhs_wrap = new BitmapWrapper (lhs);
  58
+			var rhs_wrap = new BitmapWrapper (rhs);
  59
+
  60
+			var op = new AdditiveBlendOp ();
  61
+			op.Apply (rhs_wrap, lhs_wrap);
  62
+
  63
+			Compare (lhs, "additiveblend2.png");
  64
+		}
  65
+	}
  66
+}
66  Pinta.ImageManipulation.UnitTests/BlendOperations/ColorBurnBlendOpTest.cs
... ...
@@ -0,0 +1,66 @@
  1
+// 
  2
+// ColorBurnBlendOpTest.cs
  3
+//  
  4
+// Author:
  5
+//       Jonathan Pobst <monkey@jpobst.com>
  6
+// 
  7
+// Copyright (c) 2012 Jonathan Pobst
  8
+// 
  9
+// Permission is hereby granted, free of charge, to any person obtaining a copy
  10
+// of this software and associated documentation files (the "Software"), to deal
  11
+// in the Software without restriction, including without limitation the rights
  12
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13
+// copies of the Software, and to permit persons to whom the Software is
  14
+// furnished to do so, subject to the following conditions:
  15
+// 
  16
+// The above copyright notice and this permission notice shall be included in
  17
+// all copies or substantial portions of the Software.
  18
+// 
  19
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25
+// THE SOFTWARE.
  26
+
  27
+using System;
  28
+using Microsoft.VisualStudio.TestTools.UnitTesting;
  29
+using Pinta.ImageManipulation.PixelBlendOperations;
  30
+
  31
+namespace Pinta.ImageManipulation.UnitTests.BlendOperations
  32
+{
  33
+	[TestClass]
  34
+	public class ColorBurnBlendOpTest : BaseTest
  35
+	{
  36
+		[TestMethod]
  37
+		public void ColorBurnBlendOp1 ()
  38
+		{
  39
+			var lhs = GetSourceImage ("blend1.png");
  40
+			var rhs = GetSourceImage ("blend2.png");
  41
+
  42
+			var lhs_wrap = new BitmapWrapper (lhs);
  43
+			var rhs_wrap = new BitmapWrapper (rhs);
  44
+
  45
+			var op = new ColorBurnBlendOp ();
  46
+			op.Apply (lhs_wrap, rhs_wrap);
  47
+
  48
+			Compare (rhs, "colorburnblend1.png");
  49
+		}
  50
+
  51
+		[TestMethod]
  52
+		public void ColorBurnBlendOp2 ()
  53
+		{
  54
+			var lhs = GetSourceImage ("blend1.png");
  55
+			var rhs = GetSourceImage ("blend2.png");
  56
+
  57
+			var lhs_wrap = new BitmapWrapper (lhs);
  58
+			var rhs_wrap = new BitmapWrapper (rhs);
  59
+
  60
+			var op = new ColorBurnBlendOp ();
  61
+			op.Apply (rhs_wrap, lhs_wrap);
  62
+
  63
+			Compare (lhs, "colorburnblend2.png");
  64
+		}
  65
+	}
  66
+}
66  Pinta.ImageManipulation.UnitTests/BlendOperations/ColorDodgeBlendOpTest.cs
... ...
@@ -0,0 +1,66 @@
  1
+// 
  2
+// ColorDodgeBlendOpTest.cs
  3
+//  
  4
+// Author:
  5
+//       Jonathan Pobst <monkey@jpobst.com>
  6
+// 
  7
+// Copyright (c) 2012 Jonathan Pobst
  8
+// 
  9
+// Permission is hereby granted, free of charge, to any person obtaining a copy
  10
+// of this software and associated documentation files (the "Software"), to deal
  11
+// in the Software without restriction, including without limitation the rights
  12
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13
+// copies of the Software, and to permit persons to whom the Software is
  14
+// furnished to do so, subject to the following conditions:
  15
+// 
  16
+// The above copyright notice and this permission notice shall be included in
  17
+// all copies or substantial portions of the Software.
  18
+// 
  19
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25
+// THE SOFTWARE.
  26
+
  27
+using System;
  28
+using Microsoft.VisualStudio.TestTools.UnitTesting;
  29
+using Pinta.ImageManipulation.PixelBlendOperations;
  30
+
  31
+namespace Pinta.ImageManipulation.UnitTests.BlendOperations
  32
+{
  33
+	[TestClass]
  34
+	public class ColorDodgeBlendOpTest : BaseTest
  35
+	{
  36
+		[TestMethod]
  37
+		public void ColorDodgeBlendOp1 ()
  38
+		{
  39
+			var lhs = GetSourceImage ("blend1.png");
  40
+			var rhs = GetSourceImage ("blend2.png");
  41
+
  42
+			var lhs_wrap = new BitmapWrapper (lhs);
  43
+			var rhs_wrap = new BitmapWrapper (rhs);
  44
+
  45
+			var op = new ColorDodgeBlendOp ();
  46
+			op.Apply (lhs_wrap, rhs_wrap);
  47
+
  48
+			Compare (rhs, "colordodgeblend1.png");
  49
+		}
  50
+
  51
+		[TestMethod]
  52
+		public void ColorDodgeBlendOp2 ()
  53
+		{
  54
+			var lhs = GetSourceImage ("blend1.png");
  55
+			var rhs = GetSourceImage ("blend2.png");
  56
+
  57
+			var lhs_wrap = new BitmapWrapper (lhs);
  58
+			var rhs_wrap = new BitmapWrapper (rhs);
  59
+
  60
+			var op = new ColorDodgeBlendOp ();
  61
+			op.Apply (rhs_wrap, lhs_wrap);
  62
+
  63
+			Compare (lhs, "colordodgeblend2.png");
  64
+		}
  65
+	}
  66
+}
66  Pinta.ImageManipulation.UnitTests/BlendOperations/DarkenBlendOpTest.cs
... ...
@@ -0,0 +1,66 @@
  1
+// 
  2
+// DarkenBlendOpTest.cs
  3
+//  
  4
+// Author:
  5
+//       Jonathan Pobst <monkey@jpobst.com>
  6
+// 
  7
+// Copyright (c) 2012 Jonathan Pobst
  8
+// 
  9
+// Permission is hereby granted, free of charge, to any person obtaining a copy
  10
+// of this software and associated documentation files (the "Software"), to deal
  11
+// in the Software without restriction, including without limitation the rights
  12
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13
+// copies of the Software, and to permit persons to whom the Software is
  14
+// furnished to do so, subject to the following conditions:
  15
+// 
  16
+// The above copyright notice and this permission notice shall be included in
  17
+// all copies or substantial portions of the Software.
  18
+// 
  19
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25
+// THE SOFTWARE.
  26
+
  27
+using System;
  28
+using Microsoft.VisualStudio.TestTools.UnitTesting;
  29
+using Pinta.ImageManipulation.PixelBlendOperations;
  30
+
  31
+namespace Pinta.ImageManipulation.UnitTests.BlendOperations
  32
+{
  33
+	[TestClass]
  34
+	public class DarkenBlendOpTest : BaseTest
  35
+	{
  36
+		[TestMethod]
  37
+		public void DarkenBlendOp1 ()
  38
+		{
  39
+			var lhs = GetSourceImage ("blend1.png");
  40
+			var rhs = GetSourceImage ("blend2.png");
  41
+
  42
+			var lhs_wrap = new BitmapWrapper (lhs);
  43
+			var rhs_wrap = new BitmapWrapper (rhs);
  44
+
  45
+			var op = new DarkenBlendOp ();
  46
+			op.Apply (lhs_wrap, rhs_wrap);
  47
+
  48
+			Compare (rhs, "darkenblend1.png");
  49
+		}
  50
+
  51
+		[TestMethod]
  52
+		public void DarkenBlendOp2 ()
  53
+		{
  54
+			var lhs = GetSourceImage ("blend1.png");
  55
+			var rhs = GetSourceImage ("blend2.png");
  56
+
  57
+			var lhs_wrap = new BitmapWrapper (lhs);
  58
+			var rhs_wrap = new BitmapWrapper (rhs);
  59
+
  60
+			var op = new DarkenBlendOp ();
  61
+			op.Apply (rhs_wrap, lhs_wrap);
  62
+
  63
+			Compare (lhs, "darkenblend2.png");
  64
+		}
  65
+	}
  66
+}
66  Pinta.ImageManipulation.UnitTests/BlendOperations/DifferenceBlendOpTest.cs
... ...
@@ -0,0 +1,66 @@
  1
+// 
  2
+// DifferenceBlendOpTest.cs
  3
+//  
  4
+// Author:
  5
+//       Jonathan Pobst <monkey@jpobst.com>
  6
+// 
  7
+// Copyright (c) 2012 Jonathan Pobst
  8
+// 
  9
+// Permission is hereby granted, free of charge, to any person obtaining a copy
  10
+// of this software and associated documentation files (the "Software"), to deal
  11
+// in the Software without restriction, including without limitation the rights
  12
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13
+// copies of the Software, and to permit persons to whom the Software is
  14
+// furnished to do so, subject to the following conditions:
  15
+// 
  16
+// The above copyright notice and this permission notice shall be included in
  17
+// all copies or substantial portions of the Software.
  18
+// 
  19
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25
+// THE SOFTWARE.
  26
+
  27
+using System;
  28
+using Microsoft.VisualStudio.TestTools.UnitTesting;
  29
+using Pinta.ImageManipulation.PixelBlendOperations;
  30
+
  31
+namespace Pinta.ImageManipulation.UnitTests.BlendOperations
  32
+{
  33
+	[TestClass]
  34
+	public class DifferenceBlendOpTest : BaseTest
  35
+	{
  36
+		[TestMethod]
  37
+		public void DifferenceBlendOp1 ()
  38
+		{
  39
+			var lhs = GetSourceImage ("blend1.png");
  40
+			var rhs = GetSourceImage ("blend2.png");
  41
+
  42
+			var lhs_wrap = new BitmapWrapper (lhs);
  43
+			var rhs_wrap = new BitmapWrapper (rhs);
  44
+
  45
+			var op = new DifferenceBlendOp ();
  46
+			op.Apply (lhs_wrap, rhs_wrap);
  47
+
  48
+			Compare (rhs, "differenceblend1.png");
  49
+		}
  50
+
  51
+		[TestMethod]
  52
+		public void DifferenceBlendOp2 ()
  53
+		{
  54
+			var lhs = GetSourceImage ("blend1.png");
  55
+			var rhs = GetSourceImage ("blend2.png");
  56
+
  57
+			var lhs_wrap = new BitmapWrapper (lhs);
  58
+			var rhs_wrap = new BitmapWrapper (rhs);
  59
+
  60
+			var op = new DifferenceBlendOp ();
  61
+			op.Apply (rhs_wrap, lhs_wrap);
  62
+
  63
+			Compare (lhs, "differenceblend2.png");
  64
+		}
  65
+	}
  66
+}
66  Pinta.ImageManipulation.UnitTests/BlendOperations/GlowBlendOpTest.cs
... ...
@@ -0,0 +1,66 @@
  1
+// 
  2
+// GlowBlendOpTest.cs
  3
+//  
  4
+// Author:
  5
+//       Jonathan Pobst <monkey@jpobst.com>
  6
+// 
  7
+// Copyright (c) 2012 Jonathan Pobst
  8
+// 
  9
+// Permission is hereby granted, free of charge, to any person obtaining a copy
  10
+// of this software and associated documentation files (the "Software"), to deal
  11
+// in the Software without restriction, including without limitation the rights
  12
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13
+// copies of the Software, and to permit persons to whom the Software is
  14
+// furnished to do so, subject to the following conditions:
  15
+// 
  16
+// The above copyright notice and this permission notice shall be included in
  17
+// all copies or substantial portions of the Software.
  18
+// 
  19
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25
+// THE SOFTWARE.
  26
+
  27
+using System;
  28
+using Microsoft.VisualStudio.TestTools.UnitTesting;
  29
+using Pinta.ImageManipulation.PixelBlendOperations;
  30
+
  31
+namespace Pinta.ImageManipulation.UnitTests.BlendOperations
  32
+{
  33
+	[TestClass]
  34
+	public class GlowBlendOpTest : BaseTest
  35
+	{
  36
+		[TestMethod]
  37
+		public void GlowBlendOp1 ()
  38
+		{
  39
+			var lhs = GetSourceImage ("blend1.png");
  40
+			var rhs = GetSourceImage ("blend2.png");
  41
+
  42
+			var lhs_wrap = new BitmapWrapper (lhs);
  43
+			var rhs_wrap = new BitmapWrapper (rhs);
  44
+
  45
+			var op = new GlowBlendOp ();
  46
+			op.Apply (lhs_wrap, rhs_wrap);
  47
+
  48
+			Compare (rhs, "glowblend1.png");
  49
+		}
  50
+
  51
+		[TestMethod]
  52
+		public void GlowBlendOp2 ()
  53
+		{
  54
+			var lhs = GetSourceImage ("blend1.png");
  55
+			var rhs = GetSourceImage ("blend2.png");
  56
+
  57
+			var lhs_wrap = new BitmapWrapper (lhs);
  58
+			var rhs_wrap = new BitmapWrapper (rhs);
  59
+
  60
+			var op = new GlowBlendOp ();
  61
+			op.Apply (rhs_wrap, lhs_wrap);
  62
+
  63
+			Compare (lhs, "glowblend2.png");
  64
+		}
  65
+	}
  66
+}
66  Pinta.ImageManipulation.UnitTests/BlendOperations/LightenBlendOpTest.cs
... ...
@@ -0,0 +1,66 @@
  1
+// 
  2
+// LightenBlendOpTest.cs
  3
+//  
  4
+// Author:
  5
+//       Jonathan Pobst <monkey@jpobst.com>
  6
+// 
  7
+// Copyright (c) 2012 Jonathan Pobst
  8
+// 
  9
+// Permission is hereby granted, free of charge, to any person obtaining a copy
  10
+// of this software and associated documentation files (the "Software"), to deal
  11
+// in the Software without restriction, including without limitation the rights
  12
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13
+// copies of the Software, and to permit persons to whom the Software is
  14
+// furnished to do so, subject to the following conditions:
  15
+// 
  16
+// The above copyright notice and this permission notice shall be included in
  17
+// all copies or substantial portions of the Software.
  18
+// 
  19
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25
+// THE SOFTWARE.
  26
+
  27
+using System;
  28
+using Microsoft.VisualStudio.TestTools.UnitTesting;
  29
+using Pinta.ImageManipulation.PixelBlendOperations;
  30
+
  31
+namespace Pinta.ImageManipulation.UnitTests.BlendOperations
  32
+{
  33
+	[TestClass]
  34
+	public class LightenBlendOpTest : BaseTest
  35
+	{
  36
+		[TestMethod]
  37
+		public void LightenBlendOp1 ()
  38
+		{
  39
+			var lhs = GetSourceImage ("blend1.png");
  40
+			var rhs = GetSourceImage ("blend2.png");
  41
+
  42
+			var lhs_wrap = new BitmapWrapper (lhs);
  43
+			var rhs_wrap = new BitmapWrapper (rhs);
  44
+
  45
+			var op = new LightenBlendOp ();
  46
+			op.Apply (lhs_wrap, rhs_wrap);
  47
+
  48
+			Compare (rhs, "lightenblend1.png");
  49
+		}
  50
+
  51
+		[TestMethod]
  52
+		public void LightenBlendOp2 ()
  53
+		{
  54
+			var lhs = GetSourceImage ("blend1.png");
  55
+			var rhs = GetSourceImage ("blend2.png");
  56
+
  57
+			var lhs_wrap = new BitmapWrapper (lhs);
  58
+			var rhs_wrap = new BitmapWrapper (rhs);
  59
+
  60
+			var op = new LightenBlendOp ();
  61
+			op.Apply (rhs_wrap, lhs_wrap);
  62
+
  63
+			Compare (lhs, "lightenblend2.png");
  64
+		}
  65
+	}
  66
+}
66  Pinta.ImageManipulation.UnitTests/BlendOperations/MultiplyBlendOpTest.cs
... ...
@@ -0,0 +1,66 @@
  1
+// 
  2
+// MultiplyBlendOpTest.cs
  3
+//  
  4
+// Author:
  5
+//       Jonathan Pobst <monkey@jpobst.com>
  6
+// 
  7
+// Copyright (c) 2012 Jonathan Pobst
  8
+// 
  9
+// Permission is hereby granted, free of charge, to any person obtaining a copy
  10
+// of this software and associated documentation files (the "Software"), to deal
  11
+// in the Software without restriction, including without limitation the rights
  12
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13
+// copies of the Software, and to permit persons to whom the Software is
  14
+// furnished to do so, subject to the following conditions:
  15
+// 
  16
+// The above copyright notice and this permission notice shall be included in
  17
+// all copies or substantial portions of the Software.
  18
+// 
  19
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25
+// THE SOFTWARE.
  26
+
  27
+using System;
  28
+using Microsoft.VisualStudio.TestTools.UnitTesting;
  29
+using Pinta.ImageManipulation.PixelBlendOperations;
  30
+
  31
+namespace Pinta.ImageManipulation.UnitTests.BlendOperations
  32
+{
  33
+	[TestClass]
  34
+	public class MultiplyBlendOpTest : BaseTest
  35
+	{
  36
+		[TestMethod]
  37
+		public void MultiplyBlendOp1 ()
  38
+		{
  39
+			var lhs = GetSourceImage ("blend1.png");
  40
+			var rhs = GetSourceImage ("blend2.png");
  41
+
  42
+			var lhs_wrap = new BitmapWrapper (lhs);
  43
+			var rhs_wrap = new BitmapWrapper (rhs);
  44
+
  45
+			var op = new MultiplyBlendOp ();
  46
+			op.Apply (lhs_wrap, rhs_wrap);
  47
+
  48
+			Compare (rhs, "multiplyblend1.png");
  49
+		}
  50
+
  51
+		[TestMethod]
  52
+		public void MultiplyBlendOp2 ()
  53
+		{
  54
+			var lhs = GetSourceImage ("blend1.png");
  55
+			var rhs = GetSourceImage ("blend2.png");
  56
+
  57
+			var lhs_wrap = new BitmapWrapper (lhs);
  58
+			var rhs_wrap = new BitmapWrapper (rhs);
  59
+
  60
+			var op = new MultiplyBlendOp ();
  61
+			op.Apply (rhs_wrap, lhs_wrap);
  62
+
  63
+			Compare (lhs, "multiplyblend2.png");
  64
+		}
  65
+	}
  66
+}
66  Pinta.ImageManipulation.UnitTests/BlendOperations/NegationBlendOpTest.cs
... ...
@@ -0,0 +1,66 @@
  1
+// 
  2
+// NegationBlendOpTest.cs
  3
+//  
  4
+// Author:
  5
+//       Jonathan Pobst <monkey@jpobst.com>
  6
+// 
  7
+// Copyright (c) 2012 Jonathan Pobst
  8
+// 
  9
+// Permission is hereby granted, free of charge, to any person obtaining a copy
  10
+// of this software and associated documentation files (the "Software"), to deal
  11
+// in the Software without restriction, including without limitation the rights
  12
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13
+// copies of the Software, and to permit persons to whom the Software is
  14
+// furnished to do so, subject to the following conditions:
  15
+// 
  16
+// The above copyright notice and this permission notice shall be included in
  17
+// all copies or substantial portions of the Software.
  18
+// 
  19
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25
+// THE SOFTWARE.
  26
+
  27
+using System;
  28
+using Microsoft.VisualStudio.TestTools.UnitTesting;
  29
+using Pinta.ImageManipulation.PixelBlendOperations;
  30
+
  31
+namespace Pinta.ImageManipulation.UnitTests.BlendOperations
  32
+{
  33
+	[TestClass]
  34
+	public class NegationBlendOpTest : BaseTest
  35
+	{
  36
+		[TestMethod]
  37
+		public void NegationBlendOpOp1 ()
  38
+		{
  39
+			var lhs = GetSourceImage ("blend1.png");
  40
+			var rhs = GetSourceImage ("blend2.png");
  41
+
  42
+			var lhs_wrap = new BitmapWrapper (lhs);
  43
+			var rhs_wrap = new BitmapWrapper (rhs);
  44
+
  45
+			var op = new NegationBlendOp ();
  46
+			op.Apply (lhs_wrap, rhs_wrap);
  47
+
  48
+			Compare (rhs, "negationblend1.png");
  49
+		}
  50
+
  51
+		[TestMethod]
  52
+		public void NegationBlendOpOp2 ()
  53
+		{
  54
+			var lhs = GetSourceImage ("blend1.png");
  55
+			var rhs = GetSourceImage ("blend2.png");
  56
+
  57
+			var lhs_wrap = new BitmapWrapper (lhs);
  58
+			var rhs_wrap = new BitmapWrapper (rhs);
  59
+
  60
+			var op = new NegationBlendOp ();
  61
+			op.Apply (rhs_wrap, lhs_wrap);
  62
+
  63
+			Compare (lhs, "negationblend2.png");
  64
+		}
  65
+	}
  66
+}
66  Pinta.ImageManipulation.UnitTests/BlendOperations/NormalBlendOpTest.cs
... ...
@@ -0,0 +1,66 @@
  1
+// 
  2
+// NormalBlendOpTest.cs
  3
+//  
  4
+// Author:
  5
+//       Jonathan Pobst <monkey@jpobst.com>
  6
+// 
  7
+// Copyright (c) 2012 Jonathan Pobst
  8
+// 
  9
+// Permission is hereby granted, free of charge, to any person obtaining a copy
  10
+// of this software and associated documentation files (the "Software"), to deal
  11
+// in the Software without restriction, including without limitation the rights
  12
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13
+// copies of the Software, and to permit persons to whom the Software is
  14
+// furnished to do so, subject to the following conditions:
  15
+// 
  16
+// The above copyright notice and this permission notice shall be included in
  17
+// all copies or substantial portions of the Software.
  18
+// 
  19
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25
+// THE SOFTWARE.
  26
+
  27
+using System;
  28
+using Microsoft.VisualStudio.TestTools.UnitTesting;
  29
+using Pinta.ImageManipulation.PixelBlendOperations;
  30
+
  31
+namespace Pinta.ImageManipulation.UnitTests.BlendOperations
  32
+{
  33
+	[TestClass]
  34
+	public class NormalBlendOpTest : BaseTest
  35
+	{
  36
+		[TestMethod]
  37
+		public void NormalBlendOp1 ()
  38
+		{
  39
+			var lhs = GetSourceImage ("blend1.png");
  40
+			var rhs = GetSourceImage ("blend2.png");
  41
+
  42
+			var lhs_wrap = new BitmapWrapper (lhs);
  43
+			var rhs_wrap = new BitmapWrapper (rhs);
  44
+
  45
+			var op = new NormalBlendOp ();
  46
+			op.Apply (lhs_wrap, rhs_wrap);
  47
+
  48
+			Compare (rhs, "normalblend1.png");
  49
+		}
  50
+
  51
+		[TestMethod]
  52
+		public void NormalBlendOp2 ()
  53
+		{
  54
+			var lhs = GetSourceImage ("blend1.png");
  55
+			var rhs = GetSourceImage ("blend2.png");
  56
+
  57
+			var lhs_wrap = new BitmapWrapper (lhs);
  58
+			var rhs_wrap = new BitmapWrapper (rhs);
  59
+
  60
+			var op = new NormalBlendOp ();
  61
+			op.Apply (rhs_wrap, lhs_wrap);
  62
+
  63
+			Compare (lhs, "normalblend2.png");
  64
+		}
  65
+	}
  66
+}
66  Pinta.ImageManipulation.UnitTests/BlendOperations/OverlayBlendOpTest.cs
... ...
@@ -0,0 +1,66 @@
  1
+// 
  2
+// OverlayBlendOpTest.cs
  3
+//  
  4
+// Author:
  5
+//       Jonathan Pobst <monkey@jpobst.com>
  6
+// 
  7
+// Copyright (c) 2012 Jonathan Pobst
  8
+// 
  9
+// Permission is hereby granted, free of charge, to any person obtaining a copy
  10
+// of this software and associated documentation files (the "Software"), to deal
  11
+// in the Software without restriction, including without limitation the rights
  12
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13
+// copies of the Software, and to permit persons to whom the Software is
  14
+// furnished to do so, subject to the following conditions:
  15
+// 
  16
+// The above copyright notice and this permission notice shall be included in
  17
+// all copies or substantial portions of the Software.
  18
+// 
  19
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25
+// THE SOFTWARE.
  26
+
  27
+using System;
  28
+using Microsoft.VisualStudio.TestTools.UnitTesting;
  29
+using Pinta.ImageManipulation.PixelBlendOperations;
  30
+
  31
+namespace Pinta.ImageManipulation.UnitTests.BlendOperations
  32
+{
  33
+	[TestClass]
  34
+	public class OverlayBlendOpTest : BaseTest
  35
+	{
  36
+		[TestMethod]
  37
+		public void OverlayBlendOp1 ()
  38
+		{
  39
+			var lhs = GetSourceImage ("blend1.png");
  40
+			var rhs = GetSourceImage ("blend2.png");
  41
+
  42
+			var lhs_wrap = new BitmapWrapper (lhs);
  43
+			var rhs_wrap = new BitmapWrapper (rhs);
  44
+
  45
+			var op = new OverlayBlendOp ();
  46
+			op.Apply (lhs_wrap, rhs_wrap);
  47
+
  48
+			Compare (rhs, "overlayblend1.png");
  49
+		}
  50
+
  51
+		[TestMethod]
  52
+		public void OverlayBlendOp2 ()
  53
+		{
  54
+			var lhs = GetSourceImage ("blend1.png");
  55
+			var rhs = GetSourceImage ("blend2.png");
  56
+
  57
+			var lhs_wrap = new BitmapWrapper (lhs);
  58
+			var rhs_wrap = new BitmapWrapper (rhs);
  59
+
  60
+			var op = new OverlayBlendOp ();
  61
+			op.Apply (rhs_wrap, lhs_wrap);
  62
+
  63
+			Compare (lhs, "overlayblend2.png");
  64
+		}
  65
+	}
  66
+}
66  Pinta.ImageManipulation.UnitTests/BlendOperations/ReflectBlendOpTest.cs
... ...
@@ -0,0 +1,66 @@
  1
+// 
  2
+// ReflectBlendOpTest.cs
  3
+//  
  4
+// Author:
  5
+//       Jonathan Pobst <monkey@jpobst.com>
  6
+// 
  7
+// Copyright (c) 2012 Jonathan Pobst
  8
+// 
  9
+// Permission is hereby granted, free of charge, to any person obtaining a copy
  10
+// of this software and associated documentation files (the "Software"), to deal
  11
+// in the Software without restriction, including without limitation the rights
  12
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13
+// copies of the Software, and to permit persons to whom the Software is
  14
+// furnished to do so, subject to the following conditions:
  15
+// 
  16
+// The above copyright notice and this permission notice shall be included in
  17
+// all copies or substantial portions of the Software.
  18
+// 
  19
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25
+// THE SOFTWARE.
  26
+
  27
+using System;
  28
+using Microsoft.VisualStudio.TestTools.UnitTesting;
  29
+using Pinta.ImageManipulation.PixelBlendOperations;
  30
+
  31
+namespace Pinta.ImageManipulation.UnitTests.BlendOperations
  32
+{
  33
+	[TestClass]
  34
+	public class ReflectBlendOpTest : BaseTest
  35
+	{
  36
+		[TestMethod]
  37
+		public void ReflectBlendOp1 ()
  38
+		{
  39
+			var lhs = GetSourceImage ("blend1.png");
  40
+			var rhs = GetSourceImage ("blend2.png");
  41
+
  42
+			var lhs_wrap = new BitmapWrapper (lhs);
  43
+			var rhs_wrap = new BitmapWrapper (rhs);
  44
+
  45
+			var op = new ReflectBlendOp ();
  46
+			op.Apply (lhs_wrap, rhs_wrap);
  47
+
  48
+			Compare (rhs, "reflectblend1.png");
  49
+		}
  50
+
  51
+		[TestMethod]
  52
+		public void ReflectBlendOp2 ()
  53
+		{
  54
+			var lhs = GetSourceImage ("blend1.png");
  55
+			var rhs = GetSourceImage ("blend2.png");
  56
+
  57
+			var lhs_wrap = new BitmapWrapper (lhs);
  58
+			var rhs_wrap = new BitmapWrapper (rhs);
  59
+
  60
+			var op = new ReflectBlendOp ();
  61
+			op.Apply (rhs_wrap, lhs_wrap);
  62
+
  63
+			Compare (lhs, "reflectblend2.png");
  64
+		}
  65
+	}
  66
+}
66  Pinta.ImageManipulation.UnitTests/BlendOperations/ScreenBlendOpTest.cs
... ...
@@ -0,0 +1,66 @@
  1
+// 
  2
+// ScreenBlendOpTest.cs
  3
+//  
  4
+// Author:
  5
+//       Jonathan Pobst <monkey@jpobst.com>
  6
+// 
  7
+// Copyright (c) 2012 Jonathan Pobst
  8
+// 
  9
+// Permission is hereby granted, free of charge, to any person obtaining a copy
  10
+// of this software and associated documentation files (the "Software"), to deal
  11
+// in the Software without restriction, including without limitation the rights
  12
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13
+// copies of the Software, and to permit persons to whom the Software is
  14
+// furnished to do so, subject to the following conditions:
  15
+// 
  16
+// The above copyright notice and this permission notice shall be included in
  17
+// all copies or substantial portions of the Software.
  18
+// 
  19
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25
+// THE SOFTWARE.
  26
+
  27
+using System;
  28
+using Microsoft.VisualStudio.TestTools.UnitTesting;
  29
+using Pinta.ImageManipulation.PixelBlendOperations;
  30
+
  31
+namespace Pinta.ImageManipulation.UnitTests.BlendOperations
  32
+{
  33
+	[TestClass]
  34
+	public class ScreenBlendOpTest : BaseTest
  35
+	{
  36
+		[TestMethod]
  37
+		public void ScreenBlendOp1 ()
  38
+		{
  39
+			var lhs = GetSourceImage ("blend1.png");
  40
+			var rhs = GetSourceImage ("blend2.png");
  41
+
  42
+			var lhs_wrap = new BitmapWrapper (lhs);
  43
+			var rhs_wrap = new BitmapWrapper (rhs);
  44
+
  45
+			var op = new ScreenBlendOp ();
  46
+			op.Apply (lhs_wrap, rhs_wrap);
  47
+
  48
+			Compare (rhs, "screenblend1.png");
  49
+		}
  50
+
  51
+		[TestMethod]
  52
+		public void ScreenBlendOp2 ()
  53
+		{
  54
+			var lhs = GetSourceImage ("blend1.png");
  55
+			var rhs = GetSourceImage ("blend2.png");
  56
+
  57
+			var lhs_wrap = new BitmapWrapper (lhs);
  58
+			var rhs_wrap = new BitmapWrapper (rhs);
  59
+
  60
+			var op = new ScreenBlendOp ();
  61
+			op.Apply (rhs_wrap, lhs_wrap);
  62
+
  63
+			Compare (lhs, "screenblend2.png");
  64
+		}
  65
+	}
  66
+}
66  Pinta.ImageManipulation.UnitTests/BlendOperations/XorBlendOpTest.cs
... ...
@@ -0,0 +1,66 @@
  1
+// 
  2
+// XorBlendOpTest.cs
  3
+//  
  4
+// Author:
  5
+//       Jonathan Pobst <monkey@jpobst.com>
  6
+// 
  7
+// Copyright (c) 2012 Jonathan Pobst
  8
+// 
  9
+// Permission is hereby granted, free of charge, to any person obtaining a copy
  10
+// of this software and associated documentation files (the "Software"), to deal
  11
+// in the Software without restriction, including without limitation the rights
  12
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13
+// copies of the Software, and to permit persons to whom the Software is
  14
+// furnished to do so, subject to the following conditions:
  15
+// 
  16
+// The above copyright notice and this permission notice shall be included in
  17
+// all copies or substantial portions of the Software.
  18
+// 
  19
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25
+// THE SOFTWARE.
  26
+
  27
+using System;
  28
+using Microsoft.VisualStudio.TestTools.UnitTesting;
  29
+using Pinta.ImageManipulation.PixelBlendOperations;
  30
+
  31
+namespace Pinta.ImageManipulation.UnitTests.BlendOperations
  32
+{
  33
+	[TestClass]
  34
+	public class XorBlendOpTest : BaseTest
  35
+	{
  36
+		[TestMethod]
  37
+		public void XorBlendOp1 ()
  38
+		{
  39
+			var lhs = GetSourceImage ("blend1.png");
  40
+			var rhs = GetSourceImage ("blend2.png");
  41
+
  42
+			var lhs_wrap = new BitmapWrapper (lhs);
  43
+			var rhs_wrap = new BitmapWrapper (rhs);
  44
+
  45
+			var op = new XorBlendOp ();
  46
+			op.Apply (lhs_wrap, rhs_wrap);
  47
+
  48
+			Compare (rhs, "xorblend1.png");
  49
+		}
  50
+
  51
+		[TestMethod]
  52
+		public void XorBlendOp2 ()
  53
+		{
  54
+			var lhs = GetSourceImage ("blend1.png");
  55
+			var rhs = GetSourceImage ("blend2.png");
  56
+
  57
+			var lhs_wrap = new BitmapWrapper (lhs);
  58
+			var rhs_wrap = new BitmapWrapper (rhs);
  59
+
  60
+			var op = new XorBlendOp ();
  61
+			op.Apply (rhs_wrap, lhs_wrap);
  62
+
  63
+			Compare (lhs, "xorblend2.png");
  64
+		}
  65
+	}
  66
+}
BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/additiveblend1.png
BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/additiveblend2.png
BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/colorblend1.png
BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/colorblend2.png
BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/colorburnblend1.png
BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/colorburnblend2.png
BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/colordodgeblend1.png
BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/colordodgeblend2.png
BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/darkenblend1.png
BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/darkenblend2.png
BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/differenceblend1.png
BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/differenceblend2.png
BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/glowblend1.png
BIN  Pinta.ImageManipulation.UnitTests/ExpectedBitmaps/glowblend2.png