Package com.dkt.graphics.elements
Class GPoly
java.lang.Object
com.dkt.graphics.elements.GraphicE
com.dkt.graphics.elements.GFillableE
com.dkt.graphics.elements.GMultiPoint
com.dkt.graphics.elements.GPoly
- Direct Known Subclasses:
GRegPoly
- Author:
- Federico Vera <[email protected]>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
void
draw
(Graphics2D g) Draws the component on the given graphicsMethods inherited from class com.dkt.graphics.elements.GMultiPoint
append, append, appendNR, clear, ensureCapacity, equals, getPointAt, getPoints, getShape, hashCode, indexOf, indexOf, indexOf, indexOf, isEmpty, iterator, remove, remove, remove, size, sortByX, traslate, trimToSize
Methods inherited from class com.dkt.graphics.elements.GFillableE
fill, getFillPaint, setFill, setFillPaint
Methods inherited from class com.dkt.graphics.elements.GraphicE
getPaint, getStroke, setPaint, setStroke
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
GPoly
Copy constructor- Parameters:
e
-GPoly
to copy- Throws:
IllegalArgumentException
- ife
isnull
-
GPoly
public GPoly()Generates an empty polygon -
GPoly
public GPoly(int size) Generates an empty polygon with the specified reserved space- Parameters:
size
- the reserved number of points
-
GPoly
public GPoly(int[] xs, int[] ys) - Parameters:
xs
- array containing all the x coordinatesys
- array containing all the y coordinates- Throws:
IllegalArgumentException
- if either array isnull
InvalidArgumentException
- if the array size doesn't match
-
-
Method Details
-
draw
Description copied from class:GraphicE
Draws the component on the given graphics -
clone
- Specified by:
clone
in classGFillableE
-