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

Drawing graphics primitives


Detailed Description

Drawing graphics primitives


Defines

#define draw_line(a, b, c, d, e, f)   vector_draw_line(a,b,c,d,e,f)

Functions

int get_point (int x, int y)
void draw_hline (int x, int y, int len, FGPixel ink, unsigned ppop)
void fgl::draw_box (int x, int y, int w, int h, FGPixel ink, unsigned ppop)
void fgl::fill_box (int x, int y, int w, int h, FGPixel ink, unsigned ppop)
void fgl::draw_point (int x, int y, FGPixel color, unsigned ppop)
int draw_line (int x, int y, int x1, int y1, FGPixel color, unsigned ppop)
int __fastcall drawto_line (int x, int y, FGPixel ink, unsigned ppop)
void __fastcall draw_pattern_line (int x1, int y1, int x2, int y2, FGPattern *p, unsigned ppop)
void __fastcall drawto_pattern_line (int x2, int y2, FGPattern *p, unsigned ppop)
void __fastcall draw_pattern_box (int x, int y, int a, int b, FGPattern *pat, unsigned ppop)
void __fastcall fgl::draw_spline (FGPoint points[4], FGPixel ink, unsigned ppop)
void calc_spline (FGPoint points[], int npts, FGPoint output[])
void __fastcall moveto (int x, int y)
unsigned int __fastcall fgl::areasize (int w, int h)
void __fastcall fgl::_set_default_palette (void)
void __fastcall fgl::_set_fgl_palette (void)
unsigned int __fastcall fgl::get_palette (unsigned int i)
void _palette (unsigned col, unsigned rgb)
void __fastcall CreatePaletteEntry (int rc, int gc, int bc, int idx)
int __fastcall fgl::text_out (int x, int y, char *txt, FGPixel ink, FGPixel paper, unsigned ppop, int f)
void __fastcall fill_convex (const FGPointArray *poly, FGPixel ink, unsigned ppop)
void __fastcall draw_convex (const FGPointArray *poly, FGPixel ink, unsigned ppop)
void __fastcall fgl::get_block (int x, int y, int w, int h, FGPixel *p)
void __fastcall fgl::put_block (int x, int y, int w, int h, FGPixel *p, unsigned ppop)
void __fastcall fgl::set_clip_rect (int w, int h, int x, int y)
void __fastcall fgl::fill_ellipse (int x, int y, int rx, int ry, FGPixel ink, unsigned ppop)
void __fastcall fgl::draw_ellipse (int x, int y, int rx, int ry, FGPixel ink, unsigned ppop)
void __fastcall fgl::draw_arc (int x, int y, double ang1, double ang2, int r, FGPixel ink, unsigned ppop)
void __fastcall fgl::draw_circle (int xs, int ys, int r, FGPixel ink, unsigned ppop)
void __fastcall fgl::fill_circle (int xs, int ys, int r, FGPixel ink, unsigned ppop)
void fgl::RamToVideo (FGPixel *Image, int x, int y, int xm, int ym, int w, int h, int cx_max, int cy_max, int opcia, unsigned ppop)
void fgl::VideoToRam (FGPixel *Image, int x, int y, int xm, int ym, int w, int h, int cx_max, int cy_max)
void fgl::RamToRam (int x, int y, int step_src, int ymax, int xdst, int ydst, int step_dst, int ymaxdst, int w, int h, FGPixel *from, FGPixel *to, unsigned alpha, unsigned ppop)
int fgl::gprintf (FGPixel ink, FGPixel paper, int x, int y, const char *format,...)


Function Documentation

void __fastcall fgl::_set_default_palette void   ) 
 

set startup palette

void __fastcall fgl::_set_fgl_palette void   ) 
 

refresh current palette

unsigned int __fastcall fgl::areasize int  x,
int  y
 

return size of buffer for block

void __fastcall fgl::draw_arc int  x,
int  y,
double  ang1,
double  ang2,
int  r,
FGPixel  ink,
unsigned  ppop
 

Helper function for the arc function. Calculates the points in an arc of radius r around point x, y, going anticlockwise from fixed point binary angle ang1 to ang2, and calls the specified routine for each one. The output proc will be passed first a copy of the bmp parameter, then the x, y point, then a copy of the d parameter (so putpixel() can be used as the callback).

Examples:
regress.cpp.

void fgl::draw_box int  x,
int  y,
int  w,
int  h,
FGPixel  ink,
unsigned  ppop
 

draw box directly on the screen

Examples:
regress.cpp.

void __fastcall fgl::draw_circle int  x,
int  y,
int  r,
FGPixel  ink,
unsigned  ppop
 

draw circle to the screen

Examples:
regress.cpp.

void __fastcall fgl::draw_ellipse int  x,
int  y,
int  rx,
int  ry,
FGPixel  ink,
unsigned  ppop
 

do_ellipse: Helper function for the ellipse drawing routines. Calculates the points in an ellipse of radius rx and ry around point x, y, and calls the specified routine for each one. The output proc will be passed first a copy of the bmp parameter, then the x, y point, then a copy of the d parameter (so putpixel() can be used as the callback).

Examples:
regress.cpp.

void fgl::draw_point int  x,
int  y,
FGPixel  color,
unsigned  ppop
 

Draws point directly on the screen.

Examples:
regress.cpp.

void __fastcall fgl::draw_spline FGPoint  points[4],
FGPixel  ink,
unsigned  ppop
 

Draws a bezier spline using the four control points specified in the points array.

Examples:
regress.cpp.

void fgl::fill_box int  x,
int  y,
int  w,
int  h,
FGPixel  ink,
unsigned  ppop
 

fill box directly on the screen

Examples:
fgcolor.cpp, and regress.cpp.

void __fastcall fgl::fill_circle int  xs,
int  ys,
int  r,
FGPixel  ink,
unsigned  ppop
 

fill circle directly on the screen

Examples:
regress.cpp.

void __fastcall fgl::fill_ellipse int  x,
int  y,
int  rx,
int  ry,
FGPixel  ink,
unsigned  ppop
 

ellipse fill: Draws a filled ellipse.

Examples:
double.cpp, and regress.cpp.

void __fastcall fgl::get_block int  x,
int  y,
int  a,
int  b,
FGPixel p
 

get block from VIDEORAM to RAM

unsigned int __fastcall fgl::get_palette unsigned int  i  ) 
 

get color from palette

Examples:
rad_prj.cpp.

int fgl::gprintf FGPixel  ink,
FGPixel  paper,
int  x,
int  y,
const char *  format,
  ...
 

A traditional printf to the screen + position.

Examples:
connect.cpp, events.cpp, and newapi.cpp.

void __fastcall fgl::put_block int  x,
int  y,
int  a,
int  b,
FGPixel p,
unsigned  ppop
 

put block from RAM to VIDEORAMRAM with current draw mode

Examples:
rad_prj.cpp.

void fgl::RamToRam int  x,
int  y,
int  xmax,
int  ymax,
int  xdst,
int  ydst,
int  xmaxdst,
int  ymaxdst,
int  w,
int  h,
FGPixel from,
FGPixel to,
unsigned  alpha,
unsigned  ppop
 

this is a very important procedure - its must be very fast put buffer from RAM to RAM with redraw mode The rectangles must be clipped !!!

void fgl::RamToVideo FGPixel Image,
int  x,
int  y,
int  xm,
int  ym,
int  w,
int  h,
int  cx_max,
int  cy_max,
int  opcia,
unsigned  ppop
 

this is very important procedure - its must be fast put buffer from RAM to VRAM with redraw mode

void __fastcall fgl::set_clip_rect int  w,
int  h,
int  x,
int  y
 

set clipping for screen (no window!)

int __fastcall fgl::text_out int  x,
int  y,
char *  txt,
FGPixel  ink,
FGPixel  paper,
unsigned  ppop,
int  f = FONT0816
 

draw text directly on the SCREEN

Parameters:
x x position from top left corner
y y position from top left corner
txt 7bit ascii text string (null terminated)
ink foreground color
paper background color
ppop the ROP
f font taht will be used
Returns:
the next X position behind the printed string

void fgl::VideoToRam FGPixel Image,
int  x,
int  y,
int  xm,
int  ym,
int  w,
int  h,
int  cx_max,
int  cy_max
 

this very important procedure - its must be fast put buffer from VIDEORAM to RAM with redraw mode


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