ElegantJ PDF Library Java API Specification v1.1

com.elegantj.pdf
Class PDFPolygon

java.lang.Object
  extended bycom.elegantj.pdf.PDFObject
      extended bycom.elegantj.pdf.PDFGraphicsObject
          extended bycom.elegantj.pdf.PDFPolygon

public class PDFPolygon
extends PDFGraphicsObject

This class represents PDF Polygon object


Field Summary
 
Fields inherited from class com.elegantj.pdf.PDFGraphicsObject
BEVEL_JOINS, BUTT_CAPS, MITER_JOINS, ROUND_CAPS, ROUND_JOINS, SQUARE_CAPS
 
Constructor Summary
PDFPolygon(int[] x, int[] y, int npoints)
          Constructs a PDFPolygon object with default line color and default fill color and default line width
PDFPolygon(int[] x, int[] y, int npoints, int w, java.awt.Color outLineColor, java.awt.Color fillColor)
          Constructs a PDFPolygon object with and default line width specified line color and specified fill color
 
Method Summary
 java.lang.Object clone()
          Returns the clone of this object
 boolean getFillMode()
          Method which returns the state of fill mode
 int getJoinStyle()
          Method which returns the value of join style for lines of polygon
 int getOutlineWidth()
          Method which returns the outline width of polygon
 PDFPattern getPattern()
          Returns the PDFPattern which is used to fill to this object
 int getPoints()
          Method which returns the no of points of polygon
 int[] getXCoordinates()
          Method which returns the value of x coordinates for polygon
 int[] getYCoordinates()
          Method which returns the value of y coordinates for polygon
 void setFillColor(java.awt.Color fillColor)
          Method which sets the fill color of polygon
 void setFillMode(boolean flag)
          Method which sets the state of fill mode
 void setJoinStyle(int style)
          Method which sets the value of join style for lines of polygon
 void setOutlineColor(java.awt.Color outLineColor)
          Method which sets the outline color of polygon
 void setOutlineWidth(int width)
          Method which sets the outline width of polygon
 void setPattern(PDFPattern pattern)
          Sets the PDFPattern to fill this object
 void setPoints(int points)
          Method which sets the no of points of polygon
 void setXCoordinates(int[] x)
          Method which sets the value of x coordinates for polygon
 void setYCoordinates(int[] y)
          Method which sets the value of y coordinates for polygon
 
Methods inherited from class com.elegantj.pdf.PDFObject
getPDFObjectID, getPDFObjectRefStr, getPDFObjectType, setPDFObjectID, setPDFObjectType
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDFPolygon

public PDFPolygon(int[] x,
                  int[] y,
                  int npoints)
Constructs a PDFPolygon object with default line color and default fill color and default line width

Parameters:
x - The array of integer specifying x coordinates value of points
y - The array of integer specifying y coordinates value of points
npoints - The no of points for polygon

PDFPolygon

public PDFPolygon(int[] x,
                  int[] y,
                  int npoints,
                  int w,
                  java.awt.Color outLineColor,
                  java.awt.Color fillColor)
Constructs a PDFPolygon object with and default line width specified line color and specified fill color

Parameters:
x - The array of integer specifying x coordinates value of points
y - The array of integer specifying y coordinates value of points
npoints - The no of points for polygon
w - The width of the outline of polygon
outLineColor - The outline color of the polygon
fillColor - The fill color of the polygon
Method Detail

setXCoordinates

public void setXCoordinates(int[] x)
Method which sets the value of x coordinates for polygon

Parameters:
x - the integer array of value of x coordinates for polygon

getXCoordinates

public int[] getXCoordinates()
Method which returns the value of x coordinates for polygon

Returns:
the integer array of value of x coordinates for polygon

setYCoordinates

public void setYCoordinates(int[] y)
Method which sets the value of y coordinates for polygon

Parameters:
y - the integer array of value of y coordinates for polygon

getYCoordinates

public int[] getYCoordinates()
Method which returns the value of y coordinates for polygon

Returns:
the integer array of value of y coordinates for polygon

setPoints

public void setPoints(int points)
Method which sets the no of points of polygon

Parameters:
points - the no of points of polygon

getPoints

public int getPoints()
Method which returns the no of points of polygon

Returns:
the no of points of polygon

setOutlineWidth

public void setOutlineWidth(int width)
Method which sets the outline width of polygon

Parameters:
width - the outline width of polygon

getOutlineWidth

public int getOutlineWidth()
Method which returns the outline width of polygon

Returns:
the outline width of polygon

setJoinStyle

public void setJoinStyle(int style)
Method which sets the value of join style for lines of polygon

Parameters:
style - The value of join style for lines of polygon possible values are PDFGraphicsObject.MITER_JOINS, PDFGraphicsObject.ROUND_JOINS, PDFGraphicsObject.BEVEL_JOINS

getJoinStyle

public int getJoinStyle()
Method which returns the value of join style for lines of polygon

Returns:
the value of join style of lines of polygon

setFillMode

public void setFillMode(boolean flag)
Method which sets the state of fill mode

Parameters:
flag - the state of fill mode if true, polygon will be filled with fill color

getFillMode

public boolean getFillMode()
Method which returns the state of fill mode

Returns:
the state of fill mode if true, polygon will be filled with fill color

setOutlineColor

public void setOutlineColor(java.awt.Color outLineColor)
Method which sets the outline color of polygon

Parameters:
outLineColor - The out line color of polygon

setFillColor

public void setFillColor(java.awt.Color fillColor)
Method which sets the fill color of polygon

Parameters:
fillColor - The fill color of polygon

setPattern

public void setPattern(PDFPattern pattern)
Sets the PDFPattern to fill this object


getPattern

public PDFPattern getPattern()
Returns the PDFPattern which is used to fill to this object

Returns:
The PDFPattern which is used to fill to this object

clone

public java.lang.Object clone()
Returns the clone of this object

Returns:
The clone of this object

ElegantJ PDF Library Java API Specification v1.1

For any feedback, suggestion, or query, please revert back to support@elegantjpdf.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjpdf.com
All Rights Reserved.