/hg/gfx-test: Added five new static helper methods used by vario...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Wed Oct 16 00:39:04 PDT 2013
changeset 7035be323664 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=7035be323664
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Wed Oct 16 09:42:48 2013 +0200
Added five new static helper methods used by various tests.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/framework/CommonCAGOperations.java | 81 ++++++++++++++++++++++
2 files changed, 86 insertions(+), 0 deletions(-)
diffs (101 lines):
diff -r f4329acce073 -r 7035be323664 ChangeLog
--- a/ChangeLog Tue Oct 15 08:48:26 2013 +0200
+++ b/ChangeLog Wed Oct 16 09:42:48 2013 +0200
@@ -1,3 +1,8 @@
+2013-10-16 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/framework/CommonCAGOperations.java:
+ Added five new static helper methods used by various tests.
+
2013-10-15 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/BitBltAffineQuadrantRotateTransformOp.java:
diff -r f4329acce073 -r 7035be323664 src/org/gfxtest/framework/CommonCAGOperations.java
--- a/src/org/gfxtest/framework/CommonCAGOperations.java Tue Oct 15 08:48:26 2013 +0200
+++ b/src/org/gfxtest/framework/CommonCAGOperations.java Wed Oct 16 09:42:48 2013 +0200
@@ -882,4 +882,85 @@
area.exclusiveOr(circle2Area);
return area;
}
+
+ /**
+ * Create new area composed from a circle and a rectangle.
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @return new area composed from a circle and a rectangle
+ */
+ public static Area createAreaFromOverlappingCircleAndRectangleUsingUnionOperator(TestImage image) {
+ Area area = new Area();
+ Area circleArea = createFirstOverlappingCircularArea(image);
+ Area rectangularArea = createSecondOverlappingRectangularArea(image);
+ area.add(circleArea);
+ area.add(rectangularArea);
+ return area;
+ }
+
+ /**
+ * Create new area composed from a circle and a rectangle.
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @return new area composed from a circle and a rectangle
+ */
+ public static Area createAreaFromOverlappingCircleAndRectangleUsingSubtractOperator(TestImage image) {
+ Area area = new Area();
+ Area circleArea = createFirstOverlappingCircularArea(image);
+ Area rectangularArea = createSecondOverlappingRectangularArea(image);
+ area.add(circleArea);
+ area.subtract(rectangularArea);
+ return area;
+ }
+
+ /**
+ * Create new area composed from a circle and a rectangle.
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @return new area composed from a circle and a rectangle
+ */
+ public static Area createAreaFromOverlappingCircleAndRectangleUsingInverseSubtractOperator(TestImage image) {
+ Area area = new Area();
+ Area circleArea = createFirstOverlappingCircularArea(image);
+ Area rectangularArea = createSecondOverlappingRectangularArea(image);
+ area.add(rectangularArea);
+ area.subtract(circleArea);
+ return area;
+ }
+
+ /**
+ * Create new area composed from a circle and a rectangle.
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @return new area composed from a circle and a rectangle
+ */
+ public static Area createAreaFromOverlappingCircleAndRectangleUsingIntersectOperator(TestImage image) {
+ Area area = new Area();
+ Area circleArea = createFirstOverlappingCircularArea(image);
+ Area rectangularArea = createSecondOverlappingRectangularArea(image);
+ area.add(circleArea);
+ area.intersect(rectangularArea);
+ return area;
+ }
+
+ /**
+ * Create new area composed from a circle and a rectangle.
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @return new area composed from a circle and a rectangle
+ */
+ public static Area createAreaFromOverlappingCircleAndRectangleUsingXorOperator(TestImage image) {
+ Area area = new Area();
+ Area circleArea = createFirstOverlappingCircularArea(image);
+ Area rectangularArea = createSecondOverlappingRectangularArea(image);
+ area.add(circleArea);
+ area.exclusiveOr(rectangularArea);
+ return area;
+ }
+
}
More information about the distro-pkg-dev
mailing list