![]() |
LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
|
Data Structures | |
struct | SWIM_WINDOW_T |
Structure used to store information about a specific window. More... | |
Functions | |
void | swim_put_pixel (SWIM_WINDOW_T *win, int32_t x1, int32_t y1) |
Puts a pixel at the virtual X, Y coordinate in the window. | |
void | swim_put_line (SWIM_WINDOW_T *win, int32_t x1, int32_t y1, int32_t x2, int32_t y2) |
Draw a line in the virtual window with clipping. | |
void | swim_put_diamond (SWIM_WINDOW_T *win, int32_t x, int32_t y, int32_t rx, int32_t ry) |
Draw a diamond in the virtual window. | |
void | swim_put_circle (SWIM_WINDOW_T *win, int32_t cx, int32_t cy, int32_t radius, int32_t Filled) |
Draws a circle in the virtual window. | |
void | swim_clear_screen (SWIM_WINDOW_T *win, COLOR_T colr) |
Fills the draw area of the display with the selected color. | |
void | swim_put_box (SWIM_WINDOW_T *win, int32_t x1, int32_t y1, int32_t x2, int32_t y2) |
Place a box with corners (X1, Y1) and (X2, Y2) | |
BOOL_32 | swim_window_open (SWIM_WINDOW_T *win, int32_t xsize, int32_t ysize, COLOR_T *fbaddr, int32_t xwin_min, int32_t ywin_min, int32_t xwin_max, int32_t ywin_max, int32_t border_width, COLOR_T pcolor, COLOR_T bkcolor, COLOR_T fcolor) |
Initializes a window and the default values for the window. | |
BOOL_32 | swim_window_open_noclear (SWIM_WINDOW_T *win, int32_t xsize, int32_t ysize, COLOR_T *fbaddr, int32_t xwin_min, int32_t ywin_min, int32_t xwin_max, int32_t ywin_max, int32_t border_width, COLOR_T pcolor, COLOR_T bkcolor, COLOR_T fcolor) |
Initializes a window without clearing it. | |
void | swim_window_close (SWIM_WINDOW_T *win) |
Deallocates a window. | |
void | swim_set_pen_color (SWIM_WINDOW_T *win, COLOR_T pen_color) |
Sets the pen color. | |
void | swim_set_fill_color (SWIM_WINDOW_T *win, COLOR_T fill_color) |
Sets the fill color. | |
void | swim_set_bkg_color (SWIM_WINDOW_T *win, COLOR_T bkg_color) |
Sets the color used for backgrounds. | |
int32_t | swim_get_horizontal_size (SWIM_WINDOW_T *win) |
Get the virtual window horizontal size. | |
int32_t | swim_get_vertical_size (SWIM_WINDOW_T *win) |
Get the virtual window vertical size. | |
This package provides the core SWIM capabilities such as Windows initialization and validity checks, Color support for background/primary/fill pens, graphics primatives, and Window deallocation.
void swim_clear_screen | ( | SWIM_WINDOW_T * | win, |
COLOR_T | colr | ||
) |
Fills the draw area of the display with the selected color.
win | : Pointer to window data structure |
colr | : Color to place in the window |
Definition at line 417 of file lpc_swim.c.
int32_t swim_get_horizontal_size | ( | SWIM_WINDOW_T * | win | ) |
Get the virtual window horizontal size.
win | : Pointer to window data structure |
Definition at line 579 of file lpc_swim.c.
int32_t swim_get_vertical_size | ( | SWIM_WINDOW_T * | win | ) |
Get the virtual window vertical size.
win | : Pointer to window data structure |
Definition at line 585 of file lpc_swim.c.
void swim_put_box | ( | SWIM_WINDOW_T * | win, |
int32_t | x1, | ||
int32_t | y1, | ||
int32_t | x2, | ||
int32_t | y2 | ||
) |
Place a box with corners (X1, Y1) and (X2, Y2)
win | : Pointer to window data structure |
x1 | : Virtual left position of box |
y1 | : Virtual upper position of box |
x2 | : Virtual right position of box |
y2 | : Virtual lower position of box |
Definition at line 430 of file lpc_swim.c.
void swim_put_circle | ( | SWIM_WINDOW_T * | win, |
int32_t | cx, | ||
int32_t | cy, | ||
int32_t | radius, | ||
int32_t | Filled | ||
) |
Draws a circle in the virtual window.
win | : Pointer to window data structure |
cx | : Virtual center X position of the circle |
cy | : Virtual center Y position of the circle |
radius | : Radius of the circle |
Filled | : Flag to indicate whether the circle should be filled |
Definition at line 395 of file lpc_swim.c.
void swim_put_diamond | ( | SWIM_WINDOW_T * | win, |
int32_t | x, | ||
int32_t | y, | ||
int32_t | rx, | ||
int32_t | ry | ||
) |
Draw a diamond in the virtual window.
win | : Pointer to window data structure |
x | : Virtual X position of the diamond |
y | : Virtual Y position of the diamond |
rx | : Radius for horizontal |
ry | : Radius for vertical |
Definition at line 318 of file lpc_swim.c.
void swim_put_line | ( | SWIM_WINDOW_T * | win, |
int32_t | x1, | ||
int32_t | y1, | ||
int32_t | x2, | ||
int32_t | y2 | ||
) |
Draw a line in the virtual window with clipping.
win | : Pointer to window data structure |
x1 | : Virtual X position of X line start |
y1 | : Virtual Y position of Y line start |
x2 | : Virtual X position of X line end |
y2 | : Virtual Y position of Y line end |
Definition at line 259 of file lpc_swim.c.
void swim_put_pixel | ( | SWIM_WINDOW_T * | win, |
int32_t | x1, | ||
int32_t | y1 | ||
) |
Puts a pixel at the virtual X, Y coordinate in the window.
win | : Pointer to window data structure |
x1 | : Virtual X position of pixel |
y1 | : Virtual Y position of pixel |
Definition at line 240 of file lpc_swim.c.
void swim_set_bkg_color | ( | SWIM_WINDOW_T * | win, |
COLOR_T | bkg_color | ||
) |
Sets the color used for backgrounds.
win | : Pointer to window data structure |
bkg_color | : New background color |
Definition at line 572 of file lpc_swim.c.
void swim_set_fill_color | ( | SWIM_WINDOW_T * | win, |
COLOR_T | fill_color | ||
) |
Sets the fill color.
win | : Pointer to window data structure |
fill_color | : New fill color |
Definition at line 565 of file lpc_swim.c.
void swim_set_pen_color | ( | SWIM_WINDOW_T * | win, |
COLOR_T | pen_color | ||
) |
Sets the pen color.
win | : Pointer to window data structure |
pen_color | : New pen color |
Definition at line 558 of file lpc_swim.c.
void swim_window_close | ( | SWIM_WINDOW_T * | win | ) |
Deallocates a window.
win | : Pointer to window data structure |
Definition at line 552 of file lpc_swim.c.
BOOL_32 swim_window_open | ( | SWIM_WINDOW_T * | win, |
int32_t | xsize, | ||
int32_t | ysize, | ||
COLOR_T * | fbaddr, | ||
int32_t | xwin_min, | ||
int32_t | ywin_min, | ||
int32_t | xwin_max, | ||
int32_t | ywin_max, | ||
int32_t | border_width, | ||
COLOR_T | pcolor, | ||
COLOR_T | bkcolor, | ||
COLOR_T | fcolor | ||
) |
Initializes a window and the default values for the window.
win | s: Pointer to window data structure |
xsize | : Physical horizontal dimension of the display |
ysize | : Physical vertical dimension of the display |
fbaddr | : Address of the display's frame buffer |
xwin_min | : Physical window left coordinate |
ywin_min | : Physical window top coordinate |
xwin_max | : Physical window right coordinate |
ywin_max | : Physical window bottom coordinate |
border_width | : Width of the window border in pixels |
pcolor | : Pen color |
bkcolor | : Background color |
fcolor | : Fill color |
Definition at line 500 of file lpc_swim.c.
BOOL_32 swim_window_open_noclear | ( | SWIM_WINDOW_T * | win, |
int32_t | xsize, | ||
int32_t | ysize, | ||
COLOR_T * | fbaddr, | ||
int32_t | xwin_min, | ||
int32_t | ywin_min, | ||
int32_t | xwin_max, | ||
int32_t | ywin_max, | ||
int32_t | border_width, | ||
COLOR_T | pcolor, | ||
COLOR_T | bkcolor, | ||
COLOR_T | fcolor | ||
) |
Initializes a window without clearing it.
win | s: Pointer to window data structure |
xsize | : Physical horizontal dimension of the display |
ysize | : Physical vertical dimension of the display |
fbaddr | : Address of the display's frame buffer |
xwin_min | : Physical window left coordinate |
ywin_min | : Physical window top coordinate |
xwin_max | : Physical window right coordinate |
ywin_max | : Physical window bottom coordinate |
border_width | : Width of the window border in pixels |
pcolor | : Pen color |
bkcolor | : Background color |
fcolor | : Fill color |
Definition at line 526 of file lpc_swim.c.