LightWrap++
AC++wrapperfortheLightWave3DSDK
lwpp::ImageUtil Class Reference

#include <image.h>

+ Inheritance diagram for lwpp::ImageUtil:
+ Collaboration diagram for lwpp::ImageUtil:

List of all members.

Public Member Functions

 ImageUtil (LWPixmapID _pixmap=0)
 ImageUtil (int w, int h, LWImageType type)
 Optional Constructor.
 ImageUtil (const ImageUtil &iu)
 ~ImageUtil ()
 Destroys associated pixmap as well.
void create (int w, int h, LWImageType type)
int findSaver (std::string name)
int getAttr (LWImageParam tag, void *data)
int getIndex8Map (LWPixelRGB24 *map)
void getInfo (int *w, int *h, int *type)
 Get information about the current pixmap.
int getMakerNote (LWMakerNote tag, void *data)
void getPixel (int x, int y, void *pix)
 Get a pixel from the pixmap.
void getPixelTyped (int x, int y, int type, void *pix)
std::string getSaverExtension (int n)
const char * GetSelectedName ()
size_t GetStride ()
 Returns the specific stride size in bytes for a pixel type.
bool isValid ()
 check if we have a valid pixmap
virtual LWError Load (const LoadState &ls)
 Load data from a LWLoadState.
ImageUtiloperator= (const ImageUtil &iu)
LWPixmapID resample (int w, int h, int mode)
virtual LWError Save (const SaveState &ss)
 Save data to a LWSaveState.
void save (int saver, const std::string name)
 Save the current pixmap.
void setDestroy (bool destroy=true)
void setPixel (int x, int y, void *pix)
 Set a pixel in the pixmap.
void setPixelTyped (int x, int y, int type, void *pix)

Static Public Member Functions

static void getInfo (LWPixmapID id, int *w, int *h, int *type)
static size_t GetStride (int type)
 Returns the specific stride size in bytes for a pixel type.
static int PopCount (void *inst)
 PopCount callback for LightWave.
static const char * PopName (void *inst, int n)
 PopUpName name callback for LightWave.
static int saverCount (void)
 return the amount of savers
static const char * saverName (int n)
 return the name of saver n

Protected Member Functions

bool _acquireGlobal ()
virtual bool available () const
 Check if the global is available.
virtual LWImageUtil * getGlobal ()
 Get the pointer to the global.
LWImageUtil * operator-> ()
 Get the pointer to the global.
virtual size_t popCount (void)
 Actual worker function to be supplied by the deriving class.
virtual const char * popName (int n)
 Actual worker function to be supplied by the deriving class.

Protected Attributes

int index

Static Protected Attributes

static LWImageUtil * globPtr
 Pointer to the global functions.

Detailed Description

Wrapper for LWImageUtil


Constructor & Destructor Documentation

lwpp::ImageUtil::ImageUtil ( LWPixmapID  _pixmap = 0)
inline
lwpp::ImageUtil::ImageUtil ( int  w,
int  h,
LWImageType  type 
)
inline

Optional Constructor.

Parameters:
wWidth of the pixmap
hHeight of the pixmap
typeLWImageType of the pixmap
lwpp::ImageUtil::~ImageUtil ( )
inline

Destroys associated pixmap as well.

lwpp::ImageUtil::ImageUtil ( const ImageUtil iu)
inline

Member Function Documentation

bool lwpp::GlobalBase< LWImageUtil >::_acquireGlobal ( )
inlineprotectedinherited
virtual bool lwpp::GlobalBase< LWImageUtil >::available ( ) const
inlinevirtualinherited

Check if the global is available.

void lwpp::ImageUtil::create ( int  w,
int  h,
LWImageType  type 
)
inline
int lwpp::ImageUtil::findSaver ( std::string  name)
int lwpp::ImageUtil::getAttr ( LWImageParam  tag,
void *  data 
)
inline
virtual LWImageUtil * lwpp::GlobalBase< LWImageUtil >::getGlobal ( )
inlinevirtualinherited

Get the pointer to the global.

int lwpp::ImageUtil::getIndex8Map ( LWPixelRGB24 *  map)
inline
void lwpp::ImageUtil::getInfo ( int *  w,
int *  h,
int *  type 
)
inline

Get information about the current pixmap.

Parameters:
*wWidth
*hHeight
*typeType of Bitmap
static void lwpp::ImageUtil::getInfo ( LWPixmapID  id,
int *  w,
int *  h,
int *  type 
)
inlinestatic
int lwpp::ImageUtil::getMakerNote ( LWMakerNote  tag,
void *  data 
)
inline
void lwpp::ImageUtil::getPixel ( int  x,
int  y,
void *  pix 
)
inline

Get a pixel from the pixmap.

Parameters:
xX coordinate
yY coordinate
*pixPointer for pixel storage, depends on the LWImageType of the pixmap
void lwpp::ImageUtil::getPixelTyped ( int  x,
int  y,
int  type,
void *  pix 
)
inline
std::string lwpp::ImageUtil::getSaverExtension ( int  n)
const char* lwpp::PopUpCallback::GetSelectedName ( )
inlineinherited
size_t lwpp::ImageUtil::GetStride ( int  type)
static

Returns the specific stride size in bytes for a pixel type.

size_t lwpp::ImageUtil::GetStride ( )
inline

Returns the specific stride size in bytes for a pixel type.

bool lwpp::ImageUtil::isValid ( )
inline

check if we have a valid pixmap

virtual LWError lwpp::Storeable::Load ( const LoadState ls)
inlinevirtualinherited

Load data from a LWLoadState.

Parameters:
*lsLWLoadState to load from
Returns:
An error string if an error occured, 0 otherwise

Reimplemented in lwpp::LWItem, lwpp::FileName, lwpp::Image, lwpp::ColourManager, lwpp::NodeEditor, and lwpp::VParm.

LWImageUtil * lwpp::GlobalBase< LWImageUtil >::operator-> ( )
inlineinherited

Get the pointer to the global.

ImageUtil& lwpp::ImageUtil::operator= ( const ImageUtil iu)
inline
static int lwpp::PopUpCallback::PopCount ( void *  inst)
inlinestaticinherited

PopCount callback for LightWave.

virtual size_t lwpp::ImageUtil::popCount ( void  )
inlineprotectedvirtual

Actual worker function to be supplied by the deriving class.

Returns:
The number of items

Implements lwpp::PopUpCallback.

static const char* lwpp::PopUpCallback::PopName ( void *  inst,
int  n 
)
inlinestaticinherited

PopUpName name callback for LightWave.

virtual const char* lwpp::ImageUtil::popName ( int  n)
inlineprotectedvirtual

Actual worker function to be supplied by the deriving class.

Parameters:
nA item index
Returns:
The name of the item

Implements lwpp::PopUpCallback.

LWPixmapID lwpp::ImageUtil::resample ( int  w,
int  h,
int  mode 
)
inline
virtual LWError lwpp::Storeable::Save ( const SaveState ss)
inlinevirtualinherited

Save data to a LWSaveState.

Parameters:
*ssLWSaveState to save to
Returns:
An error string if an error occured, 0 otherwise

Reimplemented in lwpp::LWItem, lwpp::FileName, lwpp::Image, lwpp::ColourManager, lwpp::NodeEditor, and lwpp::VParm.

void lwpp::ImageUtil::save ( int  saver,
const std::string  name 
)
inline

Save the current pixmap.

static int lwpp::ImageUtil::saverCount ( void  )
inlinestatic

return the amount of savers

Returns:
The number of savers present in LightWave
static const char* lwpp::ImageUtil::saverName ( int  n)
inlinestatic

return the name of saver n

Parameters:
nIndex of the saver to be queried
Returns:
The name of the save
void lwpp::ImageUtil::setDestroy ( bool  destroy = true)
inline
void lwpp::ImageUtil::setPixel ( int  x,
int  y,
void *  pix 
)
inline

Set a pixel in the pixmap.

Parameters:
xX coordinate
yY coordinate
*pixPointer to the pixel, depends on the LWImageType of the pixmap
void lwpp::ImageUtil::setPixelTyped ( int  x,
int  y,
int  type,
void *  pix 
)
inline

Member Data Documentation

LWImageUtil * lwpp::GlobalBase< LWImageUtil >::globPtr
staticprotectedinherited

Pointer to the global functions.

int lwpp::PopUpCallback::index
protectedinherited

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