Class Polygon

java.lang.Object
org.jpedal.annotation.Annotation
org.jpedal.annotation.Polygon

public final class Polygon extends Annotation
Defines a Polygon annotation.

Polygon annotations display closed polygons on the page. Such polygons may have many vertices connected by straight lines.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Polygon(float[] rect, float[] lineColor, float[] fillColor, float[] vertices, float lineWidth)
    Create a new Polygon annotation.
    Polygon(float[] rect, int flags, float[] lineColor, float[] fillColor, float strokingAlpha, float nonStrokingAlpha, float[] vertices, float lineWidth)
    Create a new Polygon annotation.
    Polygon(float[] rect, int flags, String contents, float[] lineColor, float[] fillColor, float strokingAlpha, float nonStrokingAlpha, String title, float[] vertices, float lineWidth)
    Create a new Polygon annotation.
  • Method Summary

    Methods inherited from class org.jpedal.annotation.Annotation

    getFlagsValue

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Polygon

      public Polygon(float[] rect, float[] lineColor, float[] fillColor, float[] vertices, float lineWidth)
      Create a new Polygon annotation.
      Parameters:
      rect - two diagonally opposite coordinate points that indicate the annotation's bounding box
      lineColor - the line color of the annotation
      fillColor - the fill color
      vertices - an array of numbers specifying the alternating horizontal and vertical coordinates of each vertex
      lineWidth - the width of the lines
    • Polygon

      public Polygon(float[] rect, int flags, float[] lineColor, float[] fillColor, float strokingAlpha, float nonStrokingAlpha, float[] vertices, float lineWidth)
      Create a new Polygon annotation.
      Parameters:
      rect - two diagonally opposite coordinate points that indicate the annotation's bounding box
      flags - the annotation's flags. See Annotation.getFlagsValue(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)
      lineColor - the line color of the annotation
      fillColor - the fill color
      strokingAlpha - the line transparency value
      nonStrokingAlpha - the fill transparency value
      vertices - an array of numbers specifying the alternating horizontal and vertical coordinates of each vertex
      lineWidth - the width of the lines
    • Polygon

      public Polygon(float[] rect, int flags, String contents, float[] lineColor, float[] fillColor, float strokingAlpha, float nonStrokingAlpha, String title, float[] vertices, float lineWidth)
      Create a new Polygon annotation.
      Parameters:
      rect - two diagonally opposite coordinate points that indicate the annotation's bounding box
      flags - the annotation's flags. See Annotation.getFlagsValue(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)
      contents - text that shall be displayed or null
      lineColor - the line color of the annotation
      fillColor - the fill color
      strokingAlpha - the line transparency value
      nonStrokingAlpha - the fill transparency value
      title - the text for the title bar
      vertices - an array of numbers specifying the alternating horizontal and vertical coordinates of each vertex
      lineWidth - the width of the lines