Torque2D Reference
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Functions
Bitmap Drawing Functions

Functions

void dglDrawBitmap (TextureObject *texObject, const Point2I &in_rAt, const U32 in_flip=GFlip_None)
 
void dglDrawBitmapTile (TextureObject *texObject, const RectI &in_rTile, const U32 in_flip=GFlip_None, F32 fSpin=0.0f, bool bSilhouette=false)
 
void dglDrawBitmapStretch (TextureObject *texObject, const RectI &in_rStretch, const U32 in_flip=GFlip_None, F32 fSpin=0.0f, bool bSilhouette=false)
 
void dglDrawBitmapSR (TextureObject *texObject, const Point2I &in_rAt, const RectI &in_rSubRegion, const U32 in_flip=GFlip_None)
 
void dglDrawBitmapStretchSR (TextureObject *texObject, const RectI &in_rStretch, const RectI &in_rSubRegion, const U32 in_flip=GFlip_None, F32 fSpin=0.0f, bool bSilhouette=false)
 

Detailed Description

These functions allow you to draw a bitmap. Each function will draw the bitmap in a specific way regarding stretching

Function Documentation

void dglDrawBitmap ( TextureObject texObject,
const Point2I in_rAt,
const U32  in_flip = GFlip_None 
)

Draws a bitmap, starting from the lower left corner, going up and right

Parameters
texObjecttexture object to be drawn
in_rAtwhere to draw the texture in 2d coordinates
in_flipenumerated constant representing any flipping to be done about the x and/or y axis
void dglDrawBitmapSR ( TextureObject texObject,
const Point2I in_rAt,
const RectI in_rSubRegion,
const U32  in_flip = GFlip_None 
)

Draws a sub region of a texture

Parameters
texObjecttexture object to be drawn
in_rAtpoint where the texture is to be drawn
in_rSubRegionportion of the texture to be drawn
in_flipenumerated constant representing any flipping to be done about the x and/or y axis
void dglDrawBitmapStretch ( TextureObject texObject,
const RectI in_rStretch,
const U32  in_flip = GFlip_None,
F32  fSpin = 0.0f,
bool  bSilhouette = false 
)

Draws a bitmap that is stretched

Parameters
texObjecttexture object to be drawn
in_rStretchrectangle where the texture will be drawn in 2d coordinates
in_flipenumerated constant representing any flipping to be done about the x and/or y axis
void dglDrawBitmapStretchSR ( TextureObject texObject,
const RectI in_rStretch,
const RectI in_rSubRegion,
const U32  in_flip = GFlip_None,
F32  fSpin = 0.0f,
bool  bSilhouette = false 
)

Draws a stretched sub region of a texture

Parameters
texObjecttexture object to be drawn
in_rStretchrectangle where the texture object will be drawn
in_rSubRegionsub region of the texture that will be applied over the stretch region of the screen
in_flipenumerated constant representing any flipping to be done about the x and/or y axis
void dglDrawBitmapTile ( TextureObject texObject,
const RectI in_rTile,
const U32  in_flip = GFlip_None,
F32  fSpin = 0.0f,
bool  bSilhouette = false 
)

Draws a power-of-two bitmap that is tiled. Requires a POT bitmap to draw properly.

Parameters
texObjecttexture object to be drawn
in_rTilerectangle where the texture will be drawn in 2d coordinates
in_flipenumerated constant representing any flipping to be done about the x and/or y axis