/hg/gfx-test: Added first three tests to the test case src/org/g...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Wed Nov 28 02:11:52 PST 2012
changeset 0d149c4a9168 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=0d149c4a9168
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Wed Nov 28 11:14:48 2012 +0100
Added first three tests to the test case src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java | 104 ++++++++++++
2 files changed, 109 insertions(+), 0 deletions(-)
diffs (134 lines):
diff -r 1c62bee39f38 -r 0d149c4a9168 ChangeLog
--- a/ChangeLog Tue Nov 27 09:39:58 2012 +0100
+++ b/ChangeLog Wed Nov 28 11:14:48 2012 +0100
@@ -1,3 +1,8 @@
+2012-11-28 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java:
+ Added first three tests to this test case.
+
2012-11-27 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/BitBltUsingBgColor.java:
diff -r 1c62bee39f38 -r 0d149c4a9168 src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java
--- a/src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java Tue Nov 27 09:39:58 2012 +0100
+++ b/src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java Wed Nov 28 11:14:48 2012 +0100
@@ -40,7 +40,16 @@
package org.gfxtest.testsuites;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+
+
+
+import org.gfxtest.framework.CommonBitmapOperations;
import org.gfxtest.framework.PrintTest;
+import org.gfxtest.framework.TestImage;
+import org.gfxtest.framework.TestResult;
import org.gfxtest.framework.annotations.BitBltOperation;
import org.gfxtest.framework.annotations.BitBltOperations;
import org.gfxtest.framework.annotations.GraphicsPrimitive;
@@ -70,6 +79,101 @@
public class PrintTestBitBltUsingBgColor extends PrintTest
{
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_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 doBitBltEmptyBufferedImageType3ByteRGB(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor)
+ {
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, backgroundColor);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR
+ *
+ * @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 doBitBltEmptyBufferedImageType4ByteABGR(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor)
+ {
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR, backgroundColor);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR
+ *
+ * @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 doBitBltEmptyBufferedImageType4ByteABGRPre(TestImage image, Graphics2D graphics2d,
+ Color backgroundColor)
+ {
+ return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE, backgroundColor);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR.
+ * Background color is set to Color.black.
+ *
+ * @param image
+ * image to used as a destination for BitBlt-type operations
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testBitBltEmptyBufferedImageType3ByteBGRbackgroundBlack(TestImage image, Graphics2D graphics2d)
+ {
+ return doBitBltEmptyBufferedImageType3ByteRGB(image, graphics2d, Color.black);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR.
+ * Background color is set to Color.black.
+ *
+ * @param image
+ * image to used as a destination for BitBlt-type operations
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testBitBltEmptyBufferedImageType4ByteABGRbackgroundBlack(TestImage image, Graphics2D graphics2d)
+ {
+ return doBitBltEmptyBufferedImageType4ByteABGR(image, graphics2d, Color.black);
+ }
+
+ /**
+ * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR_PRE.
+ * Background color is set to Color.black.
+ *
+ * @param image
+ * image to used as a destination for BitBlt-type operations
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testBitBltEmptyBufferedImageType4ByteABGRPrebackgroundBlack(TestImage image, Graphics2D graphics2d)
+ {
+ return doBitBltEmptyBufferedImageType4ByteABGRPre(image, graphics2d, Color.black);
+ }
/**
* Entry point to the test suite.
More information about the distro-pkg-dev
mailing list