Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

KrPainter Class Reference

Functions that draw on a surface. More...

#include <painter.h>

List of all members.

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.


Detailed Description

Functions that draw on a surface.

This class in generally quite slow, compared to the engine itself, but useful for general utility functions that don't need to be fast.


Member Function Documentation

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.


The documentation for this class was generated from the following file:
Generated on Sun Sep 25 16:25:50 2005 for Kyra by  doxygen 1.4.3