/hg/gfx-test: Added nine helper methods used by tests into src/o...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Tue Dec 11 00:23:00 PST 2012
changeset 5840ab9aebf2 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=5840ab9aebf2
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Dec 11 09:26:03 2012 +0100
Added nine helper methods used by tests into src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java | 157 +++++++++++-
2 files changed, 161 insertions(+), 1 deletions(-)
diffs (186 lines):
diff -r 72295736d85d -r 5840ab9aebf2 ChangeLog
--- a/ChangeLog Mon Dec 10 10:27:25 2012 +0100
+++ b/ChangeLog Tue Dec 11 09:26:03 2012 +0100
@@ -1,3 +1,8 @@
+2012-12-11 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java:
+ Added nine helper methods used by tests.
+
2012-12-10 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/BitBltUsingBgColorAlpha.java:
diff -r 72295736d85d -r 5840ab9aebf2 src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java
--- a/src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java Mon Dec 10 10:27:25 2012 +0100
+++ b/src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java Tue Dec 11 09:26:03 2012 +0100
@@ -66,7 +66,9 @@
/**
* This test check the rendering of buffered images (so called bit block
- * transfers or Bit Blt) created by various constructors.
+ * transfers or Bit Blt) created by various constructors. Such images are
+ * rendered with explicitly set background color which should affect
+ * transparent or semi-transparent images.
*
* @author Pavel Tisnovsky
*/
@@ -131,6 +133,159 @@
}
/**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_INT_ARGB
+ *
+ * @param image
+ * image to used as a destination for BitBlt-type operations
+ * @param graphics2d
+ * graphics canvas
+ * @param backgroundColor
+ * background color
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeIntARGB(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor)
+ {
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB, backgroundColor);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_INT_ARGB_PRE
+ *
+ * @param image
+ * image to used as a destination for BitBlt-type operations
+ * @param graphics2d
+ * graphics canvas
+ * @param backgroundColor
+ * background color
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeIntARGBPre(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor)
+ {
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE, backgroundColor);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_INT_BGR
+ *
+ * @param image
+ * image to used as a destination for BitBlt-type operations
+ * @param graphics2d
+ * graphics canvas
+ * @param backgroundColor
+ * background color
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeIntBGR(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor)
+ {
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_BGR, backgroundColor);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_INT_RGB
+ *
+ * @param image
+ * image to used as a destination for BitBlt-type operations
+ * @param graphics2d
+ * graphics canvas
+ * @param backgroundColor
+ * background color
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeIntRGB(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor)
+ {
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, backgroundColor);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_BYTE_BINARY
+ *
+ * @param image
+ * image to used as a destination for BitBlt-type operations
+ * @param graphics2d
+ * graphics canvas
+ * @param backgroundColor
+ * background color
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor)
+ {
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, backgroundColor);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_BYTE_GRAY
+ *
+ * @param image
+ * image to used as a destination for BitBlt-type operations
+ * @param graphics2d
+ * graphics canvas
+ * @param backgroundColor
+ * background color
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeByteGray(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor)
+ {
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY, backgroundColor);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_USHORT_555_RGB
+ *
+ * @param image
+ * image to used as a destination for BitBlt-type operations
+ * @param graphics2d
+ * graphics canvas
+ * @param backgroundColor
+ * background color
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeUshort555RGB(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor)
+ {
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB, backgroundColor);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_USHORT_565_RGB
+ *
+ * @param image
+ * image to used as a destination for BitBlt-type operations
+ * @param graphics2d
+ * graphics canvas
+ * @param backgroundColor
+ * background color
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeUshort565RGB(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor)
+ {
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB, backgroundColor);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_USHORT_GRAY
+ *
+ * @param image
+ * image to used as a destination for BitBlt-type operations
+ * @param graphics2d
+ * graphics canvas
+ * @param backgroundColor
+ * background color
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeUshortGRAY(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor)
+ {
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY, backgroundColor);
+ }
+
+ /**
* Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
* Background color is set to Color.black.
*
More information about the distro-pkg-dev
mailing list