CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

csCursorConverter Class Reference
[Common Plugin Classes]

Helper class to convert images into data formats suitable for mouse cursor creation on various platforms and toolkits. More...

#include <csplugincommon/canvas/cursorconvert.h>

List of all members.

Static Public Member Functions

bool ConvertTo1bpp (iImage *image, uint8 *&bitmap, uint8 *&mask, const csRGBcolor forecolor, const csRGBcolor backcolor, const csRGBcolor *keycolor=0, bool XbitOrder=false)
 Convert an image to 1bpp, computing an appropriate bitmap (by dithering to the given foreground and background colors) and mask (from the optionally given keycolor).
bool ConvertTo8bpp (iImage *image, uint8 *&pixels, csRGBpixel *&palette, const csRGBcolor *keycolor=0)
 Convert an image to 8bpp, computing an appropriate palette and sets pixels matching the (optional) keycolor to 0.
void StripAlphaFromRGBA (iImage *image, csRGBpixel replaceColor)
 Remove the alpha from an image by replacing the transparent parts with replaceColor.
void StripAlphaFromPal8 (csImageMemory *image)
 Remove the alpha from an image by replacing the transparent parts with index 0.


Detailed Description

Helper class to convert images into data formats suitable for mouse cursor creation on various platforms and toolkits.

Definition at line 41 of file cursorconvert.h.


Member Function Documentation

bool csCursorConverter::ConvertTo1bpp iImage image,
uint8 *&  bitmap,
uint8 *&  mask,
const csRGBcolor  forecolor,
const csRGBcolor  backcolor,
const csRGBcolor keycolor = 0,
bool  XbitOrder = false
[static]
 

Convert an image to 1bpp, computing an appropriate bitmap (by dithering to the given foreground and background colors) and mask (from the optionally given keycolor).

bool csCursorConverter::ConvertTo8bpp iImage image,
uint8 *&  pixels,
csRGBpixel *&  palette,
const csRGBcolor keycolor = 0
[static]
 

Convert an image to 8bpp, computing an appropriate palette and sets pixels matching the (optional) keycolor to 0.

void csCursorConverter::StripAlphaFromPal8 csImageMemory image  )  [static]
 

Remove the alpha from an image by replacing the transparent parts with index 0.

void csCursorConverter::StripAlphaFromRGBA iImage image,
csRGBpixel  replaceColor
[static]
 

Remove the alpha from an image by replacing the transparent parts with replaceColor.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.3.9.1