QSDK 1.1 Documentation
Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

Q::Bitmap Struct Reference
[Shading & Lighting]

Wrapper for image based Clips. More...

#include <Q/q.h>

Inheritance diagram for Q::Bitmap:

Q::Object Q::ObjectBase List of all members.

Public Member Functions

 Bitmap ()
 Bitmap (Clip clip)
 ~Bitmap ()
unsigned int width () const
unsigned int height () const
unsigned int depth () const
bool isMip (unsigned int &mipLevel) const
Text clipName () const

Static Public Member Functions

Bitmap create (const char *name, Image::Pixmap *, const Database &db=Database())
Bitmap create (const char *name, const Clip &, const Database &db=Database())
Bitmap find (const char *name)
ClassType classType ()
Bitmap cast (const ObjectBase &)

Detailed Description

Wrapper for image based Clips.

A Bitmap object is an image whose data is either contained in a Clip object in a database or in an Image::Pixmap object in memory. It is used mainly to build Texture objects.


Constructor & Destructor Documentation

Q::Bitmap::Bitmap  ) 
 

Return a null bitmap reference.

Q::Bitmap::Bitmap Clip  clip  ) 
 

Create an unnamed bitmap from the given clip. The Bitmap will not be persisted until you create a Texture using it. It is recommended to use Bitmap::create() where possible to do this as you can control the name of the Bitmap and its persistence.

Q::Bitmap::~Bitmap  ) 
 

Destroy the bitmap.


Member Function Documentation

Bitmap Q::Bitmap::cast const ObjectBase  )  [static]
 

If the object referenced by obj is a Bitmap, then return a suitable Bitmap reference to the object.

Note:
Casting this object will cause it to be loaded from the database if it is not currently resident.

ClassType Q::Bitmap::classType  )  [static]
 

Return the type for this class.

Text Q::Bitmap::clipName  )  const
 

Return the name of the clip this bitmap was loaded from.

Bitmap Q::Bitmap::create const char *  name,
const Clip ,
const Database db = Database()
[static]
 

Create a new bitmap from the supplied clip in the given database, db, or in the most recently attached read-write database if db is null. The new Bitmap will be named name. You are advised to use the same name as the Clip where possible.

Bitmap Q::Bitmap::create const char *  name,
Image::Pixmap ,
const Database db = Database()
[static]
 

Create a new clip in the given database, db, or in the most recently attached read-write database if db is null. The new clip will be named name and will have a type and content derived from the given image. A bitmap object is created from the new clip and returned.

unsigned int Q::Bitmap::depth  )  const
 

Return the bit depth of the bitmap.

Bitmap Q::Bitmap::find const char *  name  )  [static]
 

Search the currently attached databases for a Bitmap with the given name and return that object, if it exists.

unsigned int Q::Bitmap::height  )  const
 

Return the height of the bitmap.

bool Q::Bitmap::isMip unsigned int &  mipLevel  )  const
 

Return true if the bitmap represents an image which can be used as a mip-level in a texture. Only square images whose dimensions are a power of two can be used in this way due to hardware limitations. If the bitmap is valid and square, mipLevel is modified to return the mip-level closest to the input value.

unsigned int Q::Bitmap::width  )  const
 

Return the width of the bitmap.

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004