Class XYPolygonAnnotation

    • Constructor Detail

      • XYPolygonAnnotation

        public XYPolygonAnnotation​(double[] polygon)
        Creates a new annotation (where, by default, the polygon is drawn with a black outline). The array of polygon coordinates must contain an even number of coordinates (each pair is an (x, y) location on the plot) and the last point is automatically joined back to the first point.
        Parameters:
        polygon - the coordinates of the polygon's vertices (null not permitted).
      • XYPolygonAnnotation

        public XYPolygonAnnotation​(double[] polygon,
                                   Stroke stroke,
                                   Paint outlinePaint)
        Creates a new annotation where the box is drawn as an outline using the specified stroke and outlinePaint. The array of polygon coordinates must contain an even number of coordinates (each pair is an (x, y) location on the plot) and the last point is automatically joined back to the first point.
        Parameters:
        polygon - the coordinates of the polygon's vertices (null not permitted).
        stroke - the shape stroke (null permitted).
        outlinePaint - the shape color (null permitted).
      • XYPolygonAnnotation

        public XYPolygonAnnotation​(double[] polygon,
                                   Stroke stroke,
                                   Paint outlinePaint,
                                   Paint fillPaint)
        Creates a new annotation. The array of polygon coordinates must contain an even number of coordinates (each pair is an (x, y) location on the plot) and the last point is automatically joined back to the first point.
        Parameters:
        polygon - the coordinates of the polygon's vertices (null not permitted).
        stroke - the shape stroke (null permitted).
        outlinePaint - the shape color (null permitted).
        fillPaint - the paint used to fill the shape (null permitted).