#include <painter.h>
Public Member Functions | |
void | SetPixel (int x, int y, const KrRGBA &color) |
A slow but universal pixel set. | |
void | SetPixel (void *target, U8 red, U8 green, U8 blue, U8 alpha) |
Same as above, alternate parameters. | |
void | DrawBox (int x, int y, int w, int h, U8 red, U8 green, U8 blue) |
Draw a hollow box. | |
void | DrawBox (int x, int y, int w, int h, const KrRGBA *colors, int nColors) |
Draw a hollow box. | |
void | DrawFilledBox (int x, int y, int w, int h, U8 red, U8 green, U8 blue) |
Draw a hollow box. | |
void | DrawVLine (int x, int y, int h, U8 red, U8 green, U8 blue) |
Draw a vertical line. | |
void | DrawVLine (int x, int y, int h, const KrRGBA *colors, int nColors) |
Draw a vertical line. | |
void | DrawHLine (int x, int y, int h, U8 red, U8 green, U8 blue) |
Draw a horizontal line. | |
void | DrawHLine (int x, int y, int h, const KrRGBA *colors, int nColors) |
Draw a horizontal line. | |
void | BreakPixel (int x, int y, U8 *r, U8 *g, U8 *b, U8 *a) |
Breaks a pixel into r, g, b, and a components. | |
void | BreakPixel (int x, int y, KrRGBA *rgba) |
Breaks a pixel into r, g, b, and a components. |
This class in generally quite slow, compared to the engine itself, but useful for general utility functions that don't need to be fast.
void KrPainter::BreakPixel | ( | int | x, | |
int | y, | |||
KrRGBA * | rgba | |||
) | [inline] |
Breaks a pixel into r, g, b, and a components.
NOTE: alpha is returned in conventional units, 0=transparent, 255=opaque.
void KrPainter::BreakPixel | ( | int | x, | |
int | y, | |||
U8 * | r, | |||
U8 * | g, | |||
U8 * | b, | |||
U8 * | a | |||
) |
Breaks a pixel into r, g, b, and a components.
NOTE: alpha is returned in conventional units, 0=transparent, 255=opaque.
void KrPainter::SetPixel | ( | int | x, | |
int | y, | |||
const KrRGBA & | color | |||
) |
A slow but universal pixel set.
NOTE: Uses the alpha channel for 32 bit color. Alpha is in conventional units.