MTek-GDL 0.100.4-muffintrap
Loading...
Searching...
No Matches
Functions
Basic Graphics Module

Basic graphics module for simple graphics drawing or prototyping purposes. More...

Functions

void gdl::DrawPoint (short x, short y, u_int col)
 Draws a point or a single pixel.
 
void gdl::DrawLine (short x1, short y1, short x2, short y2, u_int col)
 Draws a line.
 
void gdl::DrawBox (short x1, short y1, short x2, short y2, u_int col)
 Draws a box.
 
void gdl::DrawBoxF (short x1, short y1, short x2, short y2, u_int col)
 Draws a filled box.
 
void gdl::DrawLineG (short x1, short y1, short x2, short y2, u_int col_a, u_int col_b)
 Draws a gouraud-shaded line.
 
void gdl::DrawBoxG (short x1, short y1, short x2, short y2, u_int tl_col, u_int tr_col, u_int br_col, u_int bl_col)
 Draws a gouraud-shaded box.
 
void gdl::DrawBoxFG (short x1, short y1, short x2, short y2, u_int tl_col, u_int tr_col, u_int br_col, u_int bl_col)
 Draws a filled gouraud-shaded box.
 

Detailed Description

Basic graphics module for simple graphics drawing or prototyping purposes.

Because these graphics functions send vertex data directly to the GX, it is best not to call these routines too redundantly otherwise, a slowdown will occur.

These functions are mostly meant for prototyping purposes.

Function Documentation

◆ DrawBox()

void gdl::DrawBox ( short  x1,
short  y1,
short  x2,
short  y2,
u_int  col 
)

Draws a box.

Parameters
[in]x1X coordinate of upper-left point of box.
[in]y1Y coordinate of upper-left point of box.
[in]x2X coordinate of lower-right point of box.
[in]y2Y coordinate of lower-right point of box.
[in]colColor of point (see gdl::Color::ColorValues or Color Handling Macros).

◆ DrawBoxF()

void gdl::DrawBoxF ( short  x1,
short  y1,
short  x2,
short  y2,
u_int  col 
)

Draws a filled box.

Parameters
[in]x1X coordinate of upper-left point of box.
[in]y1Y coordinate of upper-left point of box.
[in]x2X coordinate of lower-right point of box.
[in]y2Y coordinate of lower-right point of box.
[in]colColor of point (see gdl::Color::ColorValues or Color Handling Macros).

◆ DrawBoxFG()

void gdl::DrawBoxFG ( short  x1,
short  y1,
short  x2,
short  y2,
u_int  tl_col,
u_int  tr_col,
u_int  br_col,
u_int  bl_col 
)

Draws a filled gouraud-shaded box.

Parameters
[in]x1X coordinate of upper-left point of box.
[in]y1Y coordinate of upper-left point of box.
[in]x2X coordinate of lower-right point of box.
[in]y2Y coordinate of lower-right point of box.
[in]tl_colColor of top-left point of box (see gdl::Color::ColorValues or Color Handling Macros).
[in]tr_colColor of top-right point of box.
[in]br_colColor of bottom-right point of box.
[in]bl_colColor of bottom-left point of box.

◆ DrawBoxG()

void gdl::DrawBoxG ( short  x1,
short  y1,
short  x2,
short  y2,
u_int  tl_col,
u_int  tr_col,
u_int  br_col,
u_int  bl_col 
)

Draws a gouraud-shaded box.

Parameters
[in]x1X coordinate of upper-left point of box.
[in]y1Y coordinate of upper-left point of box.
[in]x2X coordinate of lower-right point of box.
[in]y2Y coordinate of lower-right point of box.
[in]tl_colColor of top-left point of box (see gdl::Color::ColorValues or Color Handling Macros).
[in]tr_colColor of top-right point of box.
[in]br_colColor of bottom-right point of box.
[in]bl_colColor of bottom-left point of box.

◆ DrawLine()

void gdl::DrawLine ( short  x1,
short  y1,
short  x2,
short  y2,
u_int  col 
)

Draws a line.

You can adjust the point size with GX_SetLineWidth() but its going to be tricky since the function doesn't really take sizes in pixels exactly.

Parameters
[in]x1X coordinate of start point of line.
[in]y1Y coordinate of start point of line.
[in]x2X coordinate of end point of line.
[in]y2Y coordinate of end point of line.
[in]colColor of point (see gdl::Color::ColorValues or Color Handling Macros).

◆ DrawLineG()

void gdl::DrawLineG ( short  x1,
short  y1,
short  x2,
short  y2,
u_int  col_a,
u_int  col_b 
)

Draws a gouraud-shaded line.

Parameters
[in]x1X coordinate of start point of line.
[in]y1Y coordinate of start point of line.
[in]x2X coordinate of end point of line.
[in]y2Y coordinate of end point of line.
[in]col_aColor of start point of line (see gdl::Color::ColorValues or Color Handling Macros).
[in]col_bColor of end point of line.

◆ DrawPoint()

void gdl::DrawPoint ( short  x,
short  y,
u_int  col 
)

Draws a point or a single pixel.

You can adjust the point size with GX_SetPointSize() but its going to be tricky since the function does not exactly take the size in pixels units.

Parameters
[in]xX coordinate of point.
[in]yY coordinate of point.
[in]colColor of point (see gdl::Color::ColorValues or Color Handling Macros).