Class Picture

java.lang.Object
  extended by SimplePicture
      extended by Picture
All Implemented Interfaces:
DigitalPicture

public class Picture
extends SimplePicture

A class that represents a picture. This class inherits from SimplePicture and allows the student to add functionality to the Picture class. In JES, many "extra" features are already present, available through OO-notation for the advanced media computation students. Copyright Georgia Institute of Technology 2004-2005


Constructor Summary
Picture()
          Constructor that takes no arguments
Picture(int width, int height)
          Constructor that takes the width and height
Picture(Picture copyPicture)
          Constructor that takes a picture and creates a copy of that picture
Picture(java.lang.String fileName)
          Constructor that takes a file name and creates the picture
 
Method Summary
 void addArc(java.awt.Color acolor, int x, int y, int w, int h, int start, int angle)
           
 void addArcFilled(java.awt.Color acolor, int x, int y, int w, int h, int start, int angle)
           
 void addLine(java.awt.Color acolor, int x1, int y1, int x2, int y2)
           
 void addOval(java.awt.Color acolor, int x, int y, int w, int h)
           
 void addOvalFilled(java.awt.Color acolor, int x, int y, int w, int h)
           
 void addRect(java.awt.Color acolor, int x, int y, int w, int h)
           
 void addRectFilled(java.awt.Color acolor, int x, int y, int w, int h)
           
 void addText(java.awt.Color acolor, int x, int y, java.lang.String string)
           
 void addTextWithStyle(java.awt.Color acolor, int x, int y, java.lang.String string, java.awt.Font style)
           
 java.lang.String toString()
          Method to return a string with information about this picture.
 
Methods inherited from class SimplePicture
addMessage, copyPicture, createGraphics, explore, getBasicPixel, getBufferedImage, getExtension, getFileName, getGraphics, getHeight, getImage, getMediaPath, getPictureFrame, getPictureWithHeight, getPixel, getPixels, getTitle, getTransformEnclosingRect, getWidth, hide, load, load, loadImage, loadOrFail, loadPictureAndShowIt, repaint, setAllPixelsToAColor, setBasicPixel, setMediaPath, setPictureFrame, setTitle, setVisible, show, write, writeOrFail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Picture

public Picture()
Constructor that takes no arguments


Picture

public Picture(java.lang.String fileName)
Constructor that takes a file name and creates the picture

Parameters:
fileName - the name of the file to create the picture from

Picture

public Picture(int width,
               int height)
Constructor that takes the width and height

Parameters:
width - the width of the desired picture
height - the height of the desired picture

Picture

public Picture(Picture copyPicture)
Constructor that takes a picture and creates a copy of that picture

Method Detail

toString

public java.lang.String toString()
Method to return a string with information about this picture.

Overrides:
toString in class SimplePicture
Returns:
a string with information about the picture such as fileName, height and width.

addLine

public void addLine(java.awt.Color acolor,
                    int x1,
                    int y1,
                    int x2,
                    int y2)

addText

public void addText(java.awt.Color acolor,
                    int x,
                    int y,
                    java.lang.String string)

addTextWithStyle

public void addTextWithStyle(java.awt.Color acolor,
                             int x,
                             int y,
                             java.lang.String string,
                             java.awt.Font style)

addRect

public void addRect(java.awt.Color acolor,
                    int x,
                    int y,
                    int w,
                    int h)

addRectFilled

public void addRectFilled(java.awt.Color acolor,
                          int x,
                          int y,
                          int w,
                          int h)

addOvalFilled

public void addOvalFilled(java.awt.Color acolor,
                          int x,
                          int y,
                          int w,
                          int h)

addOval

public void addOval(java.awt.Color acolor,
                    int x,
                    int y,
                    int w,
                    int h)

addArcFilled

public void addArcFilled(java.awt.Color acolor,
                         int x,
                         int y,
                         int w,
                         int h,
                         int start,
                         int angle)

addArc

public void addArc(java.awt.Color acolor,
                   int x,
                   int y,
                   int w,
                   int h,
                   int start,
                   int angle)