uwcse.graphics
Class CurvedShape

java.lang.Object
  |
  +--uwcse.graphics.ShapeImpl
        |
        +--uwcse.graphics.CurvedShape
All Implemented Interfaces:
Shape
Direct Known Subclasses:
Arc, Oval

public abstract class CurvedShape
extends ShapeImpl
implements Shape

An abstract class for curved shapes that fit within bounding rectangles. The main operations are to read the x and y coordinates of the upper-left corner and the center of the bounding rectangle (getX(), getY(), getCenterX(), and getCenterY()), to change the position of the shape (moveBy(...) and moveTo(...)), to rotate the position of the curved shape around some point (rotateAround(...)), to read and change the color of the shape (getColor() and setColor(...)), to read and change the width and height of the curved shape (getWidth(), getHeight(), and resize(...)), and add to and remove from a GWindow (addTo(...) and removeFromWindow()). Other operations are mainly for internal use, and should not be called by regular client programs.


Method Summary
 void resize(int newWidth, int newHeight)
          Change the width and height of the curved shape
 
Methods inherited from class uwcse.graphics.ShapeImpl
addTo, currentWindow, getBoundingBox, getCenterX, getCenterY, getColor, getHeight, getWidth, getX, getY, intersects, moveBy, moveTo, recordWindow, removeFromWindow, rotateAround, setColor, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface uwcse.graphics.Shape
addTo, currentWindow, getBoundingBox, getCenterX, getCenterY, getColor, getHeight, getWidth, getX, getY, intersects, moveBy, moveTo, paint, recordWindow, removeFromWindow, rotateAround, setColor
 

Method Detail

resize

public void resize(int newWidth,
                   int newHeight)
Change the width and height of the curved shape
Parameters:
newWidth - the new width
newHeight - the new height