Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

gfxutil.cpp File Reference

#include <stdio.h>
#include "gfxcore.h"
#include "gfxutil.h"

Go to the source code of this file.

Functions

void GFX_RoundRect (Graphics *gfx, int x, int y, int w, int h, int r, bool shadow)
 Draw a rounded rectangle.

void GFX_ProgressBar (Graphics *gfx, int x, int y, int w, int h, float value, float min, float max)
 Draw a progress bar.


Function Documentation

void GFX_ProgressBar Graphics   gfx,
int    x,
int    y,
int    w,
int    h,
float    value,
float    min,
float    max
 

Draw a progress bar.

Parameters:
gfx  graphics context to draw on
x,y  coordinates of top-left corner
w,h  width and height of progressbar
value,min,max  minimum, maximum and current value (default: min=0, max=100)

Definition at line 70 of file gfxutil.cpp.

References BLT_COPY, BLT_XOR, GFX_FillRect(), GFX_Init(), GFX_Rectangle(), GFX_SetBlitMode(), GFX_SetFillStyle(), and width.

Referenced by gfxTest().

void GFX_RoundRect Graphics   gfx,
int    x,
int    y,
int    w,
int    h,
int    r,
bool    shadow
 

Draw a rounded rectangle.

This function draws a nicely rounded rectangle, with an optional shadow and variable roundness. (left,top) is the upper left corner of the rectangle, and (right,bottom) is its lower right corner. Notice that the rectangle gets one pixel wider and taller if a shadow is drawn.

Author:
robert dubber
Parameters:
gfx  Graphics context to use.
x,y  coordinates of top-left corner
w,h  width and height
r  roundness (default: 2)
shadow  draw a shadow (default: true)

Definition at line 38 of file gfxutil.cpp.

References GFX_HLine(), GFX_Line(), and GFX_VLine().


Generated on Sun Aug 4 21:47:38 2002 for k/os mp3v2 by doxygen1.2.16