Overview   Project   Class   Tree   Deprecated   Index 
CarnegieMellonGraphics
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

CarnegieMellonGraphics2
Class EditableImage

Image
   |
   +--EditableImage

   in CarnegieMellonGraphics.h

class EditableImage
extends Image

Images that can be manipulated at the pixel level. EditableImages should be used when you want to either do lots and lots of pixel manipulation quickly or be able to modify other images. You can use EditableImages just as you would Images, just that you can manipulate pixels.

Since:
2.1.4a
See Also:
Window::drawImage

Constructor Summary
EditableImage( const EditableImage& image )
          Copy constructor
EditableImage( const Image& image )
          Cast Image object up to an EditableImage
EditableImage( int width, int height )
          Constructor to make an image that's width x height.
~EditableImage()
          
 
Method Summary
 EditableImage clone()
          return a "deep" copy of this image
 Color getPixel( int x, int y )
          gets the color of the pixel at (x,y)
 EditableImage& operator=( const EditableImage& image )
          Assignment operator.
 void setPixel( int x, int y, const Color& c )
          sets the color of the pixel at (x,y)
 void setPixel( int x, int y, unsigned char r, unsigned char g, unsigned char b, unsigned char a = 255 )
          sets the color of the pixel at (x,y)
   
Methods inherited from class Image
operator=, operator==, operator!=, save, getWidth, getHeight, getType, checkImage, subImage
 

Constructor Detail

EditableImage

public EditableImage( const EditableImage& image );
Copy constructor

EditableImage

public EditableImage( const Image& image );
Cast Image object up to an EditableImage

EditableImage

public EditableImage( int width, int height );
Constructor to make an image that's width x height.

~EditableImage

public ~EditableImage();


Method Detail

clone

public EditableImage clone();
return a "deep" copy of this image

getPixel

public Color getPixel( int x, int y );
gets the color of the pixel at (x,y)

operator=

public EditableImage& operator=( const EditableImage& image );
Assignment operator. As always, assignment is done via references, so this is a "shallow" copy of the image. Changes to either the left-hand-side or right-hand-side will affect the other.
See Also:
clone

setPixel

public void setPixel( int x, int y, const Color& c );
sets the color of the pixel at (x,y)

setPixel

public void setPixel( int x, int y, unsigned char r, unsigned char g, unsigned char b, unsigned char a = 255 );
sets the color of the pixel at (x,y)

 Overview   Project   Class   Tree   Deprecated   Index 
CarnegieMellonGraphics
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD