Main Page   Class Hierarchy   Compound List   File List   Compound Members  

KrPainter Class Reference

Functions that draw on a surface. More...

#include <painter.h>

List of all members.

Public Methods

void SetPixel (int x, int y, const KrRGBA &color)
 A slow but universal pixel set. More...

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. More...

void BreakPixel (int x, int y, KrRGBA *rgba)
 Breaks a pixel into r, g, b, and a components. More...


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 Mon Sep 15 12:01:11 2003 for Kyra by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001