![]() |
Display Simple Graphics library
v0.5
Library containing shape, text, and bitmap drawing functions called by various display drivers
|
#include "simplegfx.h"
Functions | |
int | ComputeOutCode (int x, int y, int w, int h) |
void | drawLine (screen_t *dev, int x0, int y0, int x1, int y1, int c) |
Draws a line in the specified color. More... | |
void | drawFastHLine (screen_t *dev, int x, int y, int w, int color) |
Draws a horizontal line in the specified color. More... | |
void | drawFastVLine (screen_t *dev, int x, int y, int h, int color) |
Draws a vertical line in the specified color. More... | |
int ComputeOutCode | ( | int | x, |
int | y, | ||
int | w, | ||
int | h | ||
) |
void drawFastHLine | ( | screen_t * | dev, |
int | x, | ||
int | y, | ||
int | w, | ||
int | color | ||
) |
Draws a horizontal line in the specified color.
dev | Pointer to the display's device structure returned by the initialization function. |
x | Starting horizontal coordinate of the line, counted from the left side of the screen. |
y | Starting vertical coordinate of the line, counted down from the top of the screen. |
w | Length of the line. |
color | Color of the line, in the format native to the display. |
void drawFastVLine | ( | screen_t * | dev, |
int | x, | ||
int | y, | ||
int | h, | ||
int | color | ||
) |
Draws a vertical line in the specified color.
dev | Pointer to the display's device structure returned by the initialization function. |
x | Starting horizontal coordinate of the line, counted from the left side of the screen. |
y | Starting vertical coordinate of the line, counted down from the top of the screen. |
h | Length of the line. |
color | Color of the line, in the format native to the display. |
void drawLine | ( | screen_t * | dev, |
int | x0, | ||
int | y0, | ||
int | x1, | ||
int | y1, | ||
int | color | ||
) |
Draws a line in the specified color.
dev | Pointer to the display's device structure returned by the initialization function. |
x0 | Starting horizontal coordinate of the line, counted from the left side of the screen. |
y0 | Starting vertical coordinate of the line, counted down from the top of the screen. |
x1 | Ending horizontal coordinate of the line. |
y1 | Ending vertical coordinate of the line. |
color | Color of the shape, in the format native to the display. |