/hg/gfx-test: Nine helper methods added into BitBltUsingBgColorA...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Fri Mar 29 02:58:06 PDT 2013
changeset c515da00a2db in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=c515da00a2db
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Fri Mar 29 11:01:17 2013 +0100
Nine helper methods added into BitBltUsingBgColorAlpha test suite.
diffstat:
ChangeLog | 7 +-
src/org/gfxtest/testsuites/BitBltUsingBgColorAlpha.java | 180 ++++++++++++++++
2 files changed, 186 insertions(+), 1 deletions(-)
diffs (207 lines):
diff -r 5a69c7d7e2f4 -r c515da00a2db ChangeLog
--- a/ChangeLog Thu Mar 28 11:04:02 2013 +0100
+++ b/ChangeLog Fri Mar 29 11:01:17 2013 +0100
@@ -1,7 +1,12 @@
+2013-03-29 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/BitBltUsingBgColorAlpha.java:
+ Nine helper methods added into BitBltUsingBgColorAlpha test suite.
+
2013-03-28 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/BitBltBasicTests.java:
- Nine new tests added into BitBltBasicTests, test case reorganization.
+ Nine new tests added into BitBltBasicTests, test cases reorganization.
2013-03-27 Pavel Tisnovsky <ptisnovs at redhat.com>
diff -r 5a69c7d7e2f4 -r c515da00a2db src/org/gfxtest/testsuites/BitBltUsingBgColorAlpha.java
--- a/src/org/gfxtest/testsuites/BitBltUsingBgColorAlpha.java Thu Mar 28 11:04:02 2013 +0100
+++ b/src/org/gfxtest/testsuites/BitBltUsingBgColorAlpha.java Fri Mar 29 11:01:17 2013 +0100
@@ -162,6 +162,186 @@
}
/**
+ * 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
+ * @param alpha
+ * alpha value for background
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeIntARGBPre(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor, float alpha)
+ {
+ Color newColor = calculateTransparentColor(backgroundColor, alpha);
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE, newColor);
+ }
+
+ /**
+ * 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
+ * @param alpha
+ * alpha value for background
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeIntBGR(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor, float alpha)
+ {
+ Color newColor = calculateTransparentColor(backgroundColor, alpha);
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_BGR, newColor);
+ }
+
+ /**
+ * 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
+ * @param alpha
+ * alpha value for background
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeIntRGB(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor, float alpha)
+ {
+ Color newColor = calculateTransparentColor(backgroundColor, alpha);
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, newColor);
+ }
+
+ /**
+ * 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
+ * @param alpha
+ * alpha value for background
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeUshort555RGB(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor, float alpha)
+ {
+ Color newColor = calculateTransparentColor(backgroundColor, alpha);
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB, newColor);
+ }
+
+ /**
+ * 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
+ * @param alpha
+ * alpha value for background
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeUshort565RGB(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor, float alpha)
+ {
+ Color newColor = calculateTransparentColor(backgroundColor, alpha);
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB, newColor);
+ }
+
+ /**
+ * 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
+ * @param alpha
+ * alpha value for background
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeUshortGray(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor, float alpha)
+ {
+ Color newColor = calculateTransparentColor(backgroundColor, alpha);
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY, newColor);
+ }
+
+ /**
+ * 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
+ * @param alpha
+ * alpha value for background
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor, float alpha)
+ {
+ Color newColor = calculateTransparentColor(backgroundColor, alpha);
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, newColor);
+ }
+
+ /**
+ * 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
+ * @param alpha
+ * alpha value for background
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeByteGray(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor, float alpha)
+ {
+ Color newColor = calculateTransparentColor(backgroundColor, alpha);
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY, newColor);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_BYTE_INDEXED
+ *
+ * @param image
+ * image to used as a destination for BitBlt-type operations
+ * @param graphics2d
+ * graphics canvas
+ * @param backgroundColor
+ * background color
+ * @param alpha
+ * alpha value for background
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ private TestResult doBitBltEmptyBufferedImageTypeByteIndexed(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor, float alpha)
+ {
+ Color newColor = calculateTransparentColor(backgroundColor, alpha);
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_BYTE_INDEXED, newColor);
+ }
+
+ /**
* Calculate color with given alpha value.
*
* @param backgroundColor
More information about the distro-pkg-dev
mailing list