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

CarnegieMellonGraphics2
Class Image

   in CarnegieMellonGraphics.h
Direct Known Subclasses:
EditableImage

class Image

The Image class


Inner Classes, Typedefs, and Enums
typedef Image::Type
          Image types currently supported
JPEG JPEG Images
PNG PNG Images
SCREENAn image created from a region in a window
 
Constructor Summary
Image( const std::string& file, const Image::Type type )
          
Image()
          
Image( const Image& image )
          Copy constructor
~Image()
          
 
Method Summary
 static bool checkImage( const std::string& file, const Image::Type type )
          Class function for checking to see whether an Image exists
 int getHeight() const
          Get the height of the image
 Image::Type getType() const
          Get the type of the image
 int getWidth() const
          Get the width of the image
 bool operator!=( const Image& rhs ) const
          Comparison operator for inequality on images
 Image& operator=( const Image& rhs )
          Assignment operator
 bool operator==( const Image& rhs ) const
          Comparison operator for equality on images
 void save( const std::string& file, const Image::Type type ) const
          Save this image to a file of the specified type.
 Image subImage( int x, int y, int w, int h )
          Copy out a sub-portion of the image and return it.
 

Constructor Detail

Image

public Image( const std::string& file, const Image::Type type );

Image

public Image();

Image

public Image( const Image& image );
Copy constructor

~Image

public ~Image();


Method Detail

checkImage

public static bool checkImage( const std::string& file, const Image::Type type );
Class function for checking to see whether an Image exists

getHeight

public int getHeight() const;
Get the height of the image

getType

public Image::Type getType() const;
Get the type of the image

getWidth

public int getWidth() const;
Get the width of the image

operator!=

public bool operator!=( const Image& rhs ) const;
Comparison operator for inequality on images

operator=

public Image& operator=( const Image& rhs );
Assignment operator

operator==

public bool operator==( const Image& rhs ) const;
Comparison operator for equality on images

save

public void save( const std::string& file, const Image::Type type ) const;
Save this image to a file of the specified type.

subImage

public Image subImage( int x, int y, int w, int h );
Copy out a sub-portion of the image and return it. This is very useful for creating an animation in a single image and then chopping it into an array of sprites in your program.

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