Pixel Dust Game Engine  v0.9.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Member Functions | Static Public Member Functions | Friends | List of all members
ImageStrip Class Referenceabstract
Inheritance diagram for ImageStrip:
Inheritance graph
[legend]
Collaboration diagram for ImageStrip:
Collaboration graph
[legend]

Public Member Functions

virtual long getWidth ()
 
long getFrameWidth ()
 
int getNumFrames ()
 
void setFrameWidth (long wid)
 
void setNumFrames (int num)
 
virtual Rect getImageBounds ()
 
virtual Rect getImageBounds (Point &at)
 
virtual ImagegetFrame (int frame)=0
 return a frame of the image an image which can be passed to port draw calls
 
- Public Member Functions inherited from Image
virtual long getHeight ()
 
virtual void setTransparentColor (Color rgb)=0
 
virtual Color getTransparentColor ()=0
 
virtual void setOpacity (uint8 opacity)=0
 
virtual uint8 getOpacity () const =0
 
virtual void setEdgeClamping (bool inUseEdgeClamp)=0
 
virtual void retainData ()=0
 
virtual void retainAlpha ()=0
 Retain the alpha channel even after the image has been prepared for rasterization.
 
virtual void prepareToRasterize ()=0
 
virtual void * getData ()=0
 
virtual uint8 getAlphaValue (int32 x, int32 y) const =0
 
virtual Color getPixel (int32 x, int32 y) const =0
 return the full color info, including alpha channel, for the pixel at the given location
 
virtual ImagegetSubsection (Rect &r)=0
 create a new image from a rectangular subsection of the current one
 
ImagegetSubsection (RotatedRect &rr)
 create a new image from a rectangular subsection of the current one
 
virtual ImagegetSubsection (Quad &quad)=0
 create a new image from an Quad subsection of the current one
 
virtual ImagecreateImageScaled (float xscale, float yscale, FilterType filterType=filter_Best)=0
 create a new image by scaling the current one by a specific scaling factor
 
virtual ImagecreateImageScaledToFit (Rect r, FitType fitType=fit_Fill, FilterType filterType=filter_Best)=0
 create a new image by scaling the current one to fit a new bounding rectangle
 
virtual PortsetPort (Port *newPort)
 control which port this image draws into
 
- Public Member Functions inherited from ISerializable
virtual uint32 getSerializedSize (ISerializer *serializer) const =0
 Get number of bytes needed to hold serialized state.
 
virtual void serialize (ISerializer *serializer) const =0
 Write self out to a serializer.
 
virtual void deserialize (IDeserializer *deserializer)=0
 Read self from a deserializer.
 
virtual uint32 getMyClassTag () const =0
 Get a tag value that uniquely represents this class.
 
 ISerializable ()
 
virtual ~ISerializable ()
 
- Public Member Functions inherited from RefCountedObj
virtual void addRef () const throw ()
 
virtual void release () const throw ()
 

Static Public Member Functions

static ImageStripcreateImageStripFromData (const char *imageName, char *imageData, long imageDataLen)
 
static ImageStripcreateImageStripFromFile (const char *imageFileName)
 
- Static Public Member Functions inherited from Image
static ImagecreateImageFromData (const char *imageName, char *imageData, long imageDataLen)
 
static ImagecreateImageFromFile (const char *imageFileName)
 
static int registerImageForSerialization (Image *img)
 
static bool setImageSerializationMode (ImageSerializationMode mode)
 

Friends

class Sprite
 

Additional Inherited Members

- Public Types inherited from Image
enum  FitType {
  fit_None,
  fit_Height,
  fit_Width,
  fit_Inside,
  fit_Fill,
  fit_FillKeepProportions
}
 
enum  FilterType {
  filter_Box,
  filter_Normal,
  filter_Triangle,
  filter_Bell,
  filter_BSpline,
  filter_Mitchell,
  filter_Lanczos3,
  filter_Best = filter_Lanczos3
}
 
enum  ImageSerializationMode {
  ser_Nothing,
  ser_ByReference
}
 

Detailed Description

ImageStrip A bit image that can be blitted onto the screen You cannot create images directly, they must be loaded by the Graphics Manager

Member Function Documentation

static ImageStrip* createImageStripFromData ( const char *  imageName,
char *  imageData,
long  imageDataLen 
)
static
static ImageStrip* createImageStripFromFile ( const char *  imageFileName)
static
virtual Image* getFrame ( int  frame)
pure virtual

return a frame of the image an image which can be passed to port draw calls

long getFrameWidth ( )
inline
Rect getImageBounds ( )
inlinevirtual

convenient shortcuts to get the bounds of the image as a rectangle, offset by a point if desired if the image has multiple frames, it returns the bounds as the frame width, not the total width

Reimplemented from Image.

Rect getImageBounds ( Point at)
inlinevirtual

Reimplemented from Image.

int getNumFrames ( )
inline
long getWidth ( )
inlinevirtual

Reimplemented from Image.

void setFrameWidth ( long  wid)
inline
void setNumFrames ( int  num)
inline

Friends And Related Function Documentation

friend class Sprite
friend