Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages | Examples

Miscelanous functions


Detailed Description

Miscelanous functions


Functions

unsigned __fastcall fgl::GetXRes (void)
unsigned __fastcall fgl::GetYRes (void)
FGPixel *__fastcall fgl::GetFrameBuffer (void)
int __fastcall fgl::get_colordepth (void)
int fgl::ClipLine (int &x1, int &y1, int &x2, int &y2, int __clipx1, int __clipy1, int __clipx2, int __clipy2)
void fgl::clear_frame_buffer (FGPixel color)
int fgl::graph_change_mode (int ww, int hh)
unsigned long __fastcall fgl::FGClock (void)
const char * fgl::GetVer (void)
void fgl::cleanup (void)
int fgl::graph_set_mode (int mode)
void fgl::IError (char *s, int flag)


Function Documentation

void fgl::cleanup void   ) 
 

sanity - for backing to previous console mode only.

void fgl::clear_frame_buffer FGPixel  c  ) 
 

Clears the whole screen.

Parameters:
c background color
Examples:
cdialog.cpp, and double.cpp.

int ClipLine int &  x1,
int &  y1,
int &  x2,
int &  y2,
int  __clipx1,
int  __clipy1,
int  __clipx2,
int  __clipy2
 

Modified Cohen-Sutherland line clipping algorithm. Unlike "stock" Cohen-Sutherland algorithm, produces clipped coordinates suitable for rendering Bresenham lines.

Returns 0 if line completely clipped out (reject) else returns 1

unsigned long __fastcall fgl::FGClock void   ) 
 

Returns absolute time in msec from the start of application. Useful for timing.

int __fastcall fgl::get_colordepth void   ) 
 

Returns the number of bits used per pixels. I.e. 8 for 256 color modes 15, 16 or 32 for non-indexed modes

Examples:
rad_prj.cpp.

FGPixel *__fastcall fgl::GetFrameBuffer void   ) 
 

Returns the VRAM array address. YOu can use this address for direct videomemory access.

const char * fgl::GetVer void   ) 
 

Returns the version string, by example: "4.1.0"

unsigned __fastcall fgl::GetXRes void   ) 
 

Returns the X axis resolution (visible)

Examples:
bitmap.cpp, buttons.cpp, and rad_main.cpp.

unsigned __fastcall fgl::GetYRes void   ) 
 

Returns the Y axis resolution (visible)

Examples:
bitmap.cpp, buttons.cpp, and rad_main.cpp.

int fgl::graph_change_mode int  ww,
int  hh
 

Change from one to other graphics mode with its resolution.

Parameters:
ww the new X axis resolution
hh the new Y axis resolution
Returns:
TRUE if OK
Examples:
fgv.cpp.

int fgl::graph_set_mode int  mode  ) 
 

Set the graphics mode with its resolution.

Parameters:
mode the videomode (the screen resolution)
Returns:
TRUE if all is OK.

void fgl::IError char *  s,
int  flag
 

Show the error dialog with defined string.

Parameters:
s a string that will be shown
flag 0 for warning or for fatal error (will exit after presskey). If you want MODAL dialog, you must add to the flag the value 2.
Examples:
alpha.cpp, fgv.cpp, rad_gen.cpp, and rad_prj.cpp.


Generated on Wed Feb 9 11:31:37 2005 for OpenGUI by  doxygen 1.4.0