diff --git a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java index 90eef8b9b..f13bd0ed1 100644 --- a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java +++ b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java @@ -351,6 +351,25 @@ public class EscherGraphics shape.setLineStyleColor(foreground.getRed(), foreground.getGreen(), foreground.getBlue()); } + /** + * Fills a (closed) polygon, as defined by a pair of arrays, which + * hold the x and y coordinates. + *

+ * This draws the polygon, with nPoint line segments. + * The first nPoint - 1 line segments are + * drawn between sequential points + * (xPoints[i],yPoints[i],xPoints[i+1],yPoints[i+1]). + * The final line segment is a closing one, from the last point to + * the first (assuming they are different). + *

+ * The area inside of the polygon is defined by using an + * even-odd fill rule (also known as the alternating rule), and + * the area inside of it is filled. + * @param xPoints array of the x coordinates. + * @param yPoints array of the y coordinates. + * @param nPoints the total number of points in the polygon. + * @see java.awt.Graphics#drawPolygon(int[], int[], int) + */ public void fillPolygon(int xPoints[], int yPoints[], int nPoints) { diff --git a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java index e6c36bc95..217f0eba5 100644 --- a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java +++ b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java @@ -329,24 +329,23 @@ public class EscherGraphics2d extends Graphics2D } /** - * Fills a closed polygon defined by - * arrays of x and y coordinates. + * Fills a (closed) polygon, as defined by a pair of arrays, which + * hold the x and y coordinates. *

- * This method draws the polygon defined by nPoint line - * segments, where the first nPoint - 1 - * line segments are line segments from - * (xPoints[i - 1], yPoints[i - 1]) - * to (xPoints[i], yPoints[i]), for - * 1 ≤ i ≤ nPoints. - * The figure is automatically closed by drawing a line connecting - * the final point to the first point, if those points are different. + * This draws the polygon, with nPoint line segments. + * The first nPoint - 1 line segments are + * drawn between sequential points + * (xPoints[i],yPoints[i],xPoints[i+1],yPoints[i+1]). + * The final line segment is a closing one, from the last point to + * the first (assuming they are different). *

- * The area inside the polygon is defined using an - * even-odd fill rule, also known as the alternating rule. - * @param xPoints a an array of x coordinates. - * @param yPoints a an array of y coordinates. - * @param nPoints a the total number of points. - * @see java.awt.Graphics#drawPolygon(int[], int[], int) + * The area inside of the polygon is defined by using an + * even-odd fill rule (also known as the alternating rule), and + * the area inside of it is filled. + * @param xPoints array of the x coordinates. + * @param yPoints array of the y coordinates. + * @param nPoints the total number of points in the polygon. + * @see java.awt.Graphics#drawPolygon(int[], int[], int) */ public void fillPolygon(int xPoints[], int yPoints[], int nPoints) {