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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()voiddraw(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, trimToSizeMethods inherited from class com.dkt.graphics.elements.GFillableE
fill, getFillPaint, setFill, setFillPaintMethods inherited from class com.dkt.graphics.elements.GraphicE
getPaint, getStroke, setPaint, setStrokeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
GPoly
Copy constructor- Parameters:
e-GPolyto copy- Throws:
IllegalArgumentException- ifeisnull
-
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 isnullInvalidArgumentException- if the array size doesn't match
-
-
Method Details
-
draw
Description copied from class:GraphicEDraws the component on the given graphics -
clone
- Specified by:
clonein classGFillableE
-