Main Page   File List   Globals  

FBdraw.c File Reference

Drawing primitives. More...

Go to the source code of this file.

Functions

void FB_putpixel (int x, int y, FB_pixel color)
FB_pixel FB_getpixel (int x, int y)
void FB_vline (int x, int sy, int ey, FB_pixel color)
void FB_hline (int sx, int ex, int y, FB_pixel color)
void FB_line (int sx, int sy, int ex, int ey, FB_pixel color)
void FB_rect (int sx, int sy, int ex, int ey, FB_pixel color)
void FB_rectfill (int sx, int sy, int ex, int ey, FB_pixel color)
void FB_triangle (int x1, int y1, int x2, int y2, int x3, int y3, FB_pixel col)
void FB_circle (int cx, int cy, int radius, FB_pixel color)
void FB_clear_screen (FB_pixel color)


Detailed Description

begin : Mon Nov 20 2000
copyright : (C) 2000 by Daniele Venzano
email : venza@users.sf.net

Nathan P. Cole: added FB_triangle function

Definition in file FBdraw.c.


Function Documentation

void FB_putpixel int    x,
int    y,
FB_pixel    color
[inline]
 

Draws a pixel.

Parameters:
x  X coordinate
y  Y coordinate
color  Color of the pixel being drawn

Definition at line 71 of file FBdraw.c.

References FB_getxres(), and FB_getyres().

Referenced by FB_circle(), FB_clear_screen(), FB_hline(), FB_line(), FB_putc(), FB_rectfill(), and FB_vline().

FB_pixel FB_getpixel int    x,
int    y
 

Reads the color of a pixel.

Parameters:
x  X coordinate
y  Y coordinate

Definition at line 86 of file FBdraw.c.

References FB_getbpp().

void FB_vline int    x,
int    sy,
int    ey,
FB_pixel    color
 

Optimized version of line() to draw a vertical line

Definition at line 103 of file FBdraw.c.

References FB_getxres(), FB_getyres(), and FB_putpixel().

Referenced by FB_line(), and FB_rect().

void FB_hline int    sx,
int    ex,
int    y,
FB_pixel    color
 

Optimized version of line() to draw an horizontal line

Definition at line 135 of file FBdraw.c.

References FB_getxres(), FB_getyres(), and FB_putpixel().

Referenced by FB_line(), and FB_rect().

void FB_line int    sx,
int    sy,
int    ex,
int    ey,
FB_pixel    color
 

Draws a line.

Parameters:
sx  Start x coordinate
sy  Start y coordinate
ex  End x coordinate
ey  End y coordinate
color  Color of the line

Definition at line 165 of file FBdraw.c.

References FB_hline(), FB_putpixel(), and FB_vline().

Referenced by FB_triangle().

void FB_rect int    sx,
int    sy,
int    ex,
int    ey,
FB_pixel    color
 

Draws a rectangle (only borders).

Parameters:
sx,sy  Upper left corner
ex,ey  Lower right corner

Definition at line 241 of file FBdraw.c.

References FB_hline(), and FB_vline().

void FB_rectfill int    sx,
int    sy,
int    ex,
int    ey,
FB_pixel    color
 

Same as FB_rect, but the rectangle is filled

Definition at line 253 of file FBdraw.c.

References FB_getxres(), FB_getyres(), and FB_putpixel().

void FB_triangle int    x1,
int    y1,
int    x2,
int    y2,
int    x3,
int    y3,
FB_pixel    col
 

Draws a triangle

Parameters:
x1,y1  First vertex
x2,y2  Second vertex
x3,y3  Third vertex
col  Color

Definition at line 288 of file FBdraw.c.

References FB_line().

void FB_circle int    cx,
int    cy,
int    radius,
FB_pixel    color
 

Draws a circle

Parameters:
cx,cy  Position of the center
radius  Radius of the circle
color  Color

Definition at line 297 of file FBdraw.c.

References FB_putpixel().

void FB_clear_screen FB_pixel    color
 

Fills all the screen with the same color. Currently VERY slow.

Parameters:
color  Color used to redraw the screen

Definition at line 320 of file FBdraw.c.

References FB_getxres(), FB_getyres(), and FB_putpixel().


Generated on Sat Jul 5 09:04:52 2003 for LibFB by doxygen1.2.18