Pushes an image to LW using the LWImageProtocol. Only useful for image loaders or animation loaders.
More...
#include <imageio_handler.h>
List of all members.
Public Member Functions |
| | ImageLoaderProtocol (LWImageProtocolID _prot) |
| | ~ImageLoaderProtocol () |
| void | Done () |
| LWImageProtocolID | getID () const |
| bool | isValid () |
| int | SendLine (int line, const LWPixelID pix) |
| | Send one scanline from the image.
|
| void | SetMap (int idx, const unsigned char col[3]) |
| int | SetParam (LWImageParam param, const char *data) |
| int | SetParam (LWImageParam param, const std::string data) |
| void | SetSize (int w, int h) |
| | Set the pixel dimensions of the image.
|
Detailed Description
Pushes an image to LW using the LWImageProtocol. Only useful for image loaders or animation loaders.
Constructor & Destructor Documentation
| lwpp::ImageLoaderProtocol::ImageLoaderProtocol |
( |
LWImageProtocolID |
_prot | ) |
|
|
inline |
| lwpp::ImageLoaderProtocol::~ImageLoaderProtocol |
( |
| ) |
|
|
inline |
Member Function Documentation
| void lwpp::ImageLoaderProtocol::Done |
( |
| ) |
|
|
inline |
| LWImageProtocolID lwpp::ImageLoaderProtocol::getID |
( |
void |
| ) |
const |
|
inline |
| bool lwpp::ImageLoaderProtocol::isValid |
( |
| ) |
|
|
inline |
| int lwpp::ImageLoaderProtocol::SendLine |
( |
int |
line, |
|
|
const LWPixelID |
pix |
|
) |
| |
|
inline |
Send one scanline from the image.
Loaders must call setSize before the first call to sendLine. Scanlines are numbered from the top of the image, starting at 0. Loaders don't have to send scanlines in a particular order, but savers will receive scanlines in top to bottom order (or bottom to top if they specified the IMGF_REVERSE flag in their sendData call). A scanline begins with the leftmost pixel. The structure of the pixel data depends on the pixel type.
- Parameters:
-
| [in] | line | the current line to write to |
| [in] | pix | the pixel values for the scanline |
- Returns:
- IPSTAT_OK or an error code
| void lwpp::ImageLoaderProtocol::SetMap |
( |
int |
idx, |
|
|
const unsigned char |
col[3] |
|
) |
| |
|
inline |
| int lwpp::ImageLoaderProtocol::SetParam |
( |
LWImageParam |
param, |
|
|
const char * |
data |
|
) |
| |
|
inline |
| int lwpp::ImageLoaderProtocol::SetParam |
( |
LWImageParam |
param, |
|
|
const std::string |
data |
|
) |
| |
|
inline |
| void lwpp::ImageLoaderProtocol::SetSize |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
|
inline |
Set the pixel dimensions of the image.
This is called before the first call to sendLine.
- Parameters:
-
| [in] | w,h | The width and height are the number of pixels in a scanline and the number of scanlines, respectively. |
The documentation for this class was generated from the following file: