edu.umd.cs.piccolox.util
Interface MutablePoints

All Superinterfaces:
Points
All Known Implementing Classes:
LineShape, XYArray

public interface MutablePoints
extends Points

Minimal interface that a changeable sequence of points must provide.


Method Summary
 void addPoint(int pos, double x, double y)
          Inserts a point at the specified position.
 void removePoints(int pos, int num)
          Removes a subsequence of points.
 void setPoint(int i, double x, double y)
          Sets the coordinates for the point at the given index.
 void transformPoints(AffineTransform t)
          Modifies all points by applying the transform to them.
 
Methods inherited from interface edu.umd.cs.piccolox.util.Points
getBounds, getPoint, getPointCount, getX, getY
 

Method Detail

setPoint

void setPoint(int i,
              double x,
              double y)
Sets the coordinates for the point at the given index.

Parameters:
i - index of point
x - x component of the point's coordinates
y - y component of the point's coordinates

addPoint

void addPoint(int pos,
              double x,
              double y)
Inserts a point at the specified position.

Parameters:
pos - position at which to insert the point
x - x component of the point's coordinates
y - y component of the point's coordinates

removePoints

void removePoints(int pos,
                  int num)
Removes a subsequence of points.

Parameters:
pos - position to start removing points
num - number of points to remove

transformPoints

void transformPoints(AffineTransform t)
Modifies all points by applying the transform to them.

Parameters:
t - transformto apply to the points


Copyright © 1995-2010 Piccolo2D. All Rights Reserved.