Lugre::cImage_L Class Reference

Inheritance diagram for Lugre::cImage_L:

Inheritance graph
[legend]
Collaboration diagram for Lugre::cImage_L:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void RegisterMethods (lua_State *L)
 called by Register(), registers object-methods (see cLuaBind constructor for examples)
virtual const char * GetLuaTypeName ()

Static Public Member Functions

static int Destroy (lua_State *L)
 void Destroy ()
static int SaveAsFile (lua_State *L)
 bool SaveAsFile (sFilePath)
static int GetWidth (lua_State *L)
 float GetWidth ()
static int GetHeight (lua_State *L)
 float GetHeight ()
static int MakeTexture (lua_State *L)
static int LoadToTexture (lua_State *L)
static int GenerateBitMask (lua_State *L)
static int LoadImageFromFile (lua_State *L)
static int LoadImageFromTexture (lua_State *L)
static int SubImage (lua_State *L)
 image SubImage (image_source,iOffsetX,iOffsetY,iNewWidth,iNewHeight)
static int ImageScale (lua_State *L)
 image ImageScale (image_source,iNewWidth,iNewHeight)
static int ImageBlit (lua_State *L)
static int CreateImage (lua_State *L)
 image CreateImage ()
static int PrepareImage (lua_State *L)
static int CreatePreparedImage (lua_State *L)
static int SetPixelInPreparedImage (lua_State *L)


Detailed Description

Definition at line 67 of file lugre_image_L.cpp.


Member Function Documentation

virtual void Lugre::cImage_L::RegisterMethods ( lua_State *  L  )  [inline, virtual]

static int Lugre::cImage_L::Destroy ( lua_State *  L  )  [inline, static]

void Destroy ()

Definition at line 102 of file lugre_image_L.cpp.

References PROFILE.

static int Lugre::cImage_L::SaveAsFile ( lua_State *  L  )  [inline, static]

bool SaveAsFile (sFilePath)

Definition at line 105 of file lugre_image_L.cpp.

References Lugre::cImage::mImage, Lugre::PrintOgreExceptionAndTipps(), and PROFILE.

static int Lugre::cImage_L::GetWidth ( lua_State *  L  )  [inline, static]

float GetWidth ()

Definition at line 121 of file lugre_image_L.cpp.

References Lugre::cImage::mImage, and PROFILE.

static int Lugre::cImage_L::GetHeight ( lua_State *  L  )  [inline, static]

float GetHeight ()

Definition at line 127 of file lugre_image_L.cpp.

References Lugre::cImage::mImage, and PROFILE.

static int Lugre::cImage_L::MakeTexture ( lua_State *  L  )  [inline, static]

returns the texname, generates a unique name if no argument is passed bIsAlpha only works for single-chan-format images (colorformat) string MakeTexture (sNewTexName=nil,bIsAlpha=false)

Definition at line 135 of file lugre_image_L.cpp.

References Lugre::cOgreWrapper::GetSingleton(), Lugre::cOgreWrapper::GetUniqueName(), Lugre::cImage::mImage, and PROFILE.

static int Lugre::cImage_L::LoadToTexture ( lua_State *  L  )  [inline, static]

loads the image to an existing texture, returns true on success bool LoadToTexture (sTexName)

Definition at line 152 of file lugre_image_L.cpp.

References Lugre::cImage::mImage, and PROFILE.

static int Lugre::cImage_L::GenerateBitMask ( lua_State *  L  )  [inline, static]

useful for mousepicking or similar , bit is set if pixel_alpha >= fMinAlpha bitmask GenerateBitMask (fMinAlpha=0.5)

Definition at line 164 of file lugre_image_L.cpp.

References Lugre::cImage::mImage, and PROFILE.

static int Lugre::cImage_L::LoadImageFromFile ( lua_State *  L  )  [inline, static]

return nil on error also searches in ogre ressource paths if just a filename is provided image LoadImageFromFile (sFileNameOrPath)

Definition at line 176 of file lugre_image_L.cpp.

References Lugre::cImage::cImage(), and PROFILE.

Referenced by RegisterMethods().

static int Lugre::cImage_L::LoadImageFromTexture ( lua_State *  L  )  [inline, static]

return nil on error image LoadImageFromTexture (sTexName)

Definition at line 187 of file lugre_image_L.cpp.

References Lugre::cImage::cImage(), Lugre::cImage::mImage, and PROFILE.

Referenced by RegisterMethods().

static int Lugre::cImage_L::SubImage ( lua_State *  L  )  [inline, static]

image SubImage (image_source,iOffsetX,iOffsetY,iNewWidth,iNewHeight)

Definition at line 209 of file lugre_image_L.cpp.

References Lugre::cImage::cImage(), Lugre::cImage::mImage, Lugre::MySubImage(), and PROFILE.

Referenced by RegisterMethods().

static int Lugre::cImage_L::ImageScale ( lua_State *  L  )  [inline, static]

image ImageScale (image_source,iNewWidth,iNewHeight)

Definition at line 224 of file lugre_image_L.cpp.

References Lugre::cImage::cImage(), Lugre::cImage::mImage, and PROFILE.

Referenced by RegisterMethods().

static int Lugre::cImage_L::ImageBlit ( lua_State *  L  )  [inline, static]

x,y = left-top in destination void ImageBlit (image_source,image_dest,x,y)

Definition at line 247 of file lugre_image_L.cpp.

References Lugre::cOgreWrapper::ImageBlit(), and PROFILE.

Referenced by RegisterMethods().

static int Lugre::cImage_L::CreateImage ( lua_State *  L  )  [inline, static]

image CreateImage ()

Definition at line 257 of file lugre_image_L.cpp.

References Lugre::cImage::cImage(), and PROFILE.

Referenced by RegisterMethods().

static int Lugre::cImage_L::PrepareImage ( lua_State *  L  )  [inline, static]

void PrepareImage (w,h,r,g,b,a) prepare a global image for fast pixel paint w,h image size r,g,b,a can be nil to default to 0, rgba in [0,1] call CreatePreparedImage to create the finished image, THIS IS NOT THREADSAFE!!!!

Definition at line 266 of file lugre_image_L.cpp.

References assert, Lugre::iPreparedBufferSize, Lugre::iPreparedFormat, Lugre::iPreparedHeight, Lugre::iPreparedRowSize, Lugre::iPreparedWidth, Lugre::pPreparedBuf, and PROFILE.

Referenced by RegisterMethods().

static int Lugre::cImage_L::CreatePreparedImage ( lua_State *  L  )  [inline, static]

call CreatePreparedImage to finished the image and return it, THIS IS NOT THREADSAFE!!!! image CreatePreparedImage () you must call

Definition at line 305 of file lugre_image_L.cpp.

References Lugre::cImage::cImage(), Lugre::iPreparedFormat, Lugre::iPreparedHeight, Lugre::iPreparedWidth, Lugre::pPreparedBuf, and PROFILE.

Referenced by RegisterMethods().

static int Lugre::cImage_L::SetPixelInPreparedImage ( lua_State *  L  )  [inline, static]

set pixel color at x,y THIS IS NOT THREADSAFE!!!! void SetPixelInPreparedImage (x,y, r,g,b,a) rgba in [0,1]

Definition at line 318 of file lugre_image_L.cpp.

References Lugre::iPreparedFormat, Lugre::iPreparedHeight, Lugre::iPreparedRowSize, Lugre::iPreparedWidth, Lugre::pPreparedBuf, and PROFILE.

Referenced by RegisterMethods().

virtual const char* Lugre::cImage_L::GetLuaTypeName (  )  [inline, virtual]

Implements Lugre::cLuaBind< _T >.

Definition at line 335 of file lugre_image_L.cpp.


The documentation for this class was generated from the following file:

Generated on Wed Feb 8 06:00:18 2012 for cpp by  doxygen 1.5.6