/hg/gfx-test: 2012-01-26 Pavel Tisnovsky <ptisnovs at redhat.com>
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Thu Jan 26 03:00:02 PST 2012
changeset af5edcbd88f4 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=af5edcbd88f4
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Jan 26 12:02:27 2012 +0100
2012-01-26 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/framework/CommonBitmapOperations.java:
Added support for new raster patterns.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/framework/CommonBitmapOperations.java | 78 +++++++++++++++++++
2 files changed, 83 insertions(+), 0 deletions(-)
diffs (98 lines):
diff -r 95c3b4a9eaaf -r af5edcbd88f4 ChangeLog
--- a/ChangeLog Mon Jan 23 10:18:01 2012 +0100
+++ b/ChangeLog Thu Jan 26 12:02:27 2012 +0100
@@ -1,3 +1,8 @@
+2012-01-26 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/framework/CommonBitmapOperations.java:
+ Added support for new raster patterns.
+
2012-01-23 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/BitBltBasicTests.java:
diff -r 95c3b4a9eaaf -r af5edcbd88f4 src/org/gfxtest/framework/CommonBitmapOperations.java
--- a/src/org/gfxtest/framework/CommonBitmapOperations.java Mon Jan 23 10:18:01 2012 +0100
+++ b/src/org/gfxtest/framework/CommonBitmapOperations.java Thu Jan 26 12:02:27 2012 +0100
@@ -449,4 +449,82 @@
// BitBlt with custom scaling
return BitBlt(bufferedImage, image, graphics2d, width, height) ? TestResult.PASSED : TestResult.FAILED;
}
+
+ public static TestResult doBitBltTestWithDiagonalColorStripesImage(TestImage image, Graphics2D graphics2d, int imageType)
+ {
+ // create image with given pattern
+ BufferedImage bufferedImage = ImageFactory.createDiagonalColorStripesImage(DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType);
+ // basic check if buffered image was created
+ if (bufferedImage == null)
+ {
+ return TestResult.FAILED;
+ }
+ // BitBlt with 1:1 scaling
+ return BitBlt(bufferedImage, image, graphics2d) ? TestResult.PASSED : TestResult.FAILED;
+ }
+
+ public static TestResult doBitBltTestWithDiagonalColorStripesImage(TestImage image, Graphics2D graphics2d, int imageType, int width, int height)
+ {
+ // create image with given pattern
+ BufferedImage bufferedImage = ImageFactory.createDiagonalColorStripesImage(DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType);
+ // basic check if buffered image was created
+ if (bufferedImage == null)
+ {
+ return TestResult.FAILED;
+ }
+ // BitBlt with custom scaling
+ return BitBlt(bufferedImage, image, graphics2d, width, height) ? TestResult.PASSED : TestResult.FAILED;
+ }
+
+ public static TestResult doBitBltTestWithBWDotsImage(TestImage image, Graphics2D graphics2d, int imageType)
+ {
+ // create image with given pattern
+ BufferedImage bufferedImage = ImageFactory.createBWDotsPatternImage(DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType);
+ // basic check if buffered image was created
+ if (bufferedImage == null)
+ {
+ return TestResult.FAILED;
+ }
+ // BitBlt with 1:1 scaling
+ return BitBlt(bufferedImage, image, graphics2d) ? TestResult.PASSED : TestResult.FAILED;
+ }
+
+ public static TestResult doBitBltTestWithBWDotsImage(TestImage image, Graphics2D graphics2d, int imageType, int width, int height)
+ {
+ // create image with given pattern
+ BufferedImage bufferedImage = ImageFactory.createBWDotsPatternImage(DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType);
+ // basic check if buffered image was created
+ if (bufferedImage == null)
+ {
+ return TestResult.FAILED;
+ }
+ // BitBlt with custom scaling
+ return BitBlt(bufferedImage, image, graphics2d, width, height) ? TestResult.PASSED : TestResult.FAILED;
+ }
+
+ public static TestResult doBitBltTestWithColorDotsImage(TestImage image, Graphics2D graphics2d, int imageType)
+ {
+ // create image with given pattern
+ BufferedImage bufferedImage = ImageFactory.createColorDotsPatternImage(DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType);
+ // basic check if buffered image was created
+ if (bufferedImage == null)
+ {
+ return TestResult.FAILED;
+ }
+ // BitBlt with 1:1 scaling
+ return BitBlt(bufferedImage, image, graphics2d) ? TestResult.PASSED : TestResult.FAILED;
+ }
+
+ public static TestResult doBitBltTestWithColorDotsImage(TestImage image, Graphics2D graphics2d, int imageType, int width, int height)
+ {
+ // create image with given pattern
+ BufferedImage bufferedImage = ImageFactory.createColorDotsPatternImage(DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType);
+ // basic check if buffered image was created
+ if (bufferedImage == null)
+ {
+ return TestResult.FAILED;
+ }
+ // BitBlt with custom scaling
+ return BitBlt(bufferedImage, image, graphics2d, width, height) ? TestResult.PASSED : TestResult.FAILED;
+ }
}
More information about the distro-pkg-dev
mailing list