changeset 809:ab44756e58f8 draft

Javadoc for updateBoundary and drawRectangleAroundDifferentPixels.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Mon, 21 Mar 2016 11:18:24 +0100
parents 0f61e899a9ee
children 38e1f8d55fde
files ChangeLog src/org/gfxtest/ImageDiffer/ImageComparator.java
diffstat 2 files changed, 28 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Mar 14 11:26:01 2016 +0100
+++ b/ChangeLog	Mon Mar 21 11:18:24 2016 +0100
@@ -1,3 +1,8 @@
+2016-03-21  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/org/gfxtest/ImageDiffer/ImageComparator.java:
+	Javadoc for updateBoundary and drawRectangleAroundDifferentPixels.
+
 2016-03-14  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* src/org/gfxtest/testsuites/BlankImage.java:
--- a/src/org/gfxtest/ImageDiffer/ImageComparator.java	Mon Mar 14 11:26:01 2016 +0100
+++ b/src/org/gfxtest/ImageDiffer/ImageComparator.java	Mon Mar 21 11:18:24 2016 +0100
@@ -1,7 +1,7 @@
 /*
   Java gfx-test framework
 
-   Copyright (C) 2010, 2011  Red Hat
+   Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016  Red Hat
 
 This file is part of IcedTea.
 
@@ -48,10 +48,21 @@
 /**
  * Comparation of two images according to given comparation parameters.
  *
- * @author Pavel Tisnovsky
+ * @author Pavel Tisnovsky <ptisnovs@redhat.com>
  */
 public class ImageComparator
 {
+    /**
+     * Updates the boundary stored as two Points. Boundary specifies a
+     * rectangular area and when new point is added, it could lie inside the
+     * boundary (not change) or outside it (boundary needs to be enlarged to
+     * contain the new point).
+     * 
+     * @param min - first point that specifies boundary of rectangular area
+     * @param max - the second that specifies boundary of rectangular area
+     * @param x - x-coordinate of new point to be added into rectangular area
+     * @param y - y-coordinate of new point to be added into rectangular area
+     */
     private void updateBoundary(Point min, Point max, int x, int y)
     {
         min.x = Math.min(min.x, x);
@@ -60,6 +71,16 @@
         max.y = Math.max(max.y, y);
     }
 
+    /**
+     * Draw rectangle around the area that contain different pixels.
+     * 
+     * @param configuration - data structure that contains border width around rectangular area
+     * @param min - first point that specifies boundary of rectangular area
+     * @param max - the second that specifies boundary of rectangular area
+     * @param width - width of the area
+     * @param height - height of the area
+     * @param diffImage - image to draw to
+     */
     private void drawRectangleAroundDifferentPixels(Configuration configuration, Point min, Point max, int width,
             int height, BufferedImage diffImage)
     {