Class PolygonFillTool

java.lang.Object
  extended by java.awt.Image
      extended by java.awt.image.BufferedImage
          extended by Brush
              extended by Tool
                  extended by PolygonFillTool
All Implemented Interfaces:
java.awt.image.RenderedImage, java.awt.image.WritableRenderedImage, java.awt.Transparency

public class PolygonFillTool
extends Tool

TODO Put here a description of what this class does.

Author:
Bryan Warner Created Apr 10, 2008.

Field Summary
(package private)  java.util.ArrayList<java.lang.Integer> xarray
          this is an array for the x components of a list of points
(package private)  java.util.ArrayList<java.lang.Integer> yarray
          this is an array for the y components of a list of points
 
Fields inherited from class Tool
c, x, y
 
Fields inherited from class Brush
name
 
Fields inherited from class java.awt.image.BufferedImage
TYPE_3BYTE_BGR, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE, TYPE_BYTE_BINARY, TYPE_BYTE_GRAY, TYPE_BYTE_INDEXED, TYPE_CUSTOM, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE, TYPE_INT_BGR, TYPE_INT_RGB, TYPE_USHORT_555_RGB, TYPE_USHORT_565_RGB, TYPE_USHORT_GRAY
 
Fields inherited from class java.awt.Image
accelerationPriority, SCALE_AREA_AVERAGING, SCALE_DEFAULT, SCALE_FAST, SCALE_REPLICATE, SCALE_SMOOTH, UndefinedProperty
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
PolygonFillTool()
          this constructor makes a polygon that is filled in with the selected color.
 
Method Summary
 void finish()
          this is the method that puts the drawn item onto the canvs for all tools except polygon
 void Paint(Canvas c, int x, int y)
          paints with the brush on the specified canvas at the specified location
 void polyFinish()
          the special pollygon finishing method to draw the polygon to the canvas
 
Methods inherited from class Tool
getX, getY
 
Methods inherited from class Brush
getSize, toString
 
Methods inherited from class java.awt.image.BufferedImage
addTileObserver, coerceData, copyData, createGraphics, getAlphaRaster, getColorModel, getData, getData, getGraphics, getHeight, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getProperty, getProperty, getPropertyNames, getRaster, getRGB, getRGB, getSampleModel, getSource, getSources, getSubimage, getTile, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getTransparency, getType, getWidth, getWidth, getWritableTile, getWritableTileIndices, hasTileWriters, isAlphaPremultiplied, isTileWritable, releaseWritableTile, removeTileObserver, setData, setRGB, setRGB
 
Methods inherited from class java.awt.Image
flush, getAccelerationPriority, getCapabilities, getScaledInstance, setAccelerationPriority
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

xarray

java.util.ArrayList<java.lang.Integer> xarray
this is an array for the x components of a list of points


yarray

java.util.ArrayList<java.lang.Integer> yarray
this is an array for the y components of a list of points

Constructor Detail

PolygonFillTool

public PolygonFillTool()
this constructor makes a polygon that is filled in with the selected color.

Method Detail

polyFinish

public void polyFinish()
the special pollygon finishing method to draw the polygon to the canvas


finish

public void finish()
Description copied from class: Tool
this is the method that puts the drawn item onto the canvs for all tools except polygon

Specified by:
finish in class Tool

Paint

public void Paint(Canvas c,
                  int x,
                  int y)
Description copied from class: Brush
paints with the brush on the specified canvas at the specified location

Overrides:
Paint in class Brush
Parameters:
c - the canvas to paint to
x - the x coord of the brushes location
y - the y coord of the brushes location