PenProfile 2.x

com.livescribe.geom
Class Polygon

java.lang.Object
  extended by com.livescribe.geom.Shape
      extended by com.livescribe.geom.Polygon

public class Polygon
extends Shape

This class describes a polygon.


Field Summary
 
Fields inherited from class com.livescribe.geom.Shape
COORD_MAX, COORD_MIN, INTERSECT_CLIP, INTERSECT_EXTERNAL, INTERSECT_INTERNAL1, INTERSECT_INTERNAL2, SHAPE_COMPOSITE, SHAPE_ELLIPSE, SHAPE_LINESEGMENT, SHAPE_POINT, SHAPE_POLYGON, SHAPE_POLYLINE, SHAPE_RECTANGLE, SHAPE_STROKE, type, vertex
 
Constructor Summary
Polygon()
          Creates a new polygon having no points.
Polygon(int n)
          Creates a new polygon having n points set to (0,0).
Polygon(int[] v)
          Creates a new polygon having the specified points.
 
Method Summary
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class com.livescribe.geom.Shape
contains, getBoundingBox, getNumberofVertices, getNumberOfVertices, getSize, getType, getUnion, getX, getXY, getY, intersectsWith, setVertexArray, setX, setXY, setXY, setY
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Polygon

public Polygon()
Creates a new polygon having no points.

The internal Shape.vertex array is set to null.


Polygon

public Polygon(int n)
Creates a new polygon having n points set to (0,0).

Parameters:
n - the number of points

Polygon

public Polygon(int[] v)
Creates a new polygon having the specified points. The array should contain an even number of elements.

Parameters:
v - the vertex array
Method Detail

toString

public String toString()
Returns a string representation of this object.

Overrides:
toString in class Shape
Returns:
a string representation of this object.

PenProfile 2.x

Copyright © 2010 Livescribe Inc. All Rights Reserved.
Confidential and subject to NDA.