| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Enumerations | Functions
SWIM image manager
Simple Windows Interface manager (SWIM) graphics Library

## Detailed Description

This package provides basic SWIM image management capabilities such as image scaling, rotation, and clipping. All image data passed to SWIM must be raw image data (stored left to right, top to bottom) in the same color format as COLOR_T.

## Enumerations
enum | SWIM_ROTATION_T { NOROTATION, RIGHT, INVERT, LEFT }

## Functions
void | swim_put_image (SWIM_WINDOW_T *win, const COLOR_T *image, int32_t xsize, int32_t ysize)
| Puts a raw image into a window.
void | swim_put_invert_image (SWIM_WINDOW_T *win, const COLOR_T *image, int32_t xsize, int32_t ysize)
| Puts a raw image into a window inverted.
void | swim_put_left_image (SWIM_WINDOW_T *win, const COLOR_T *image, int32_t xsize, int32_t ysize)
| Puts a raw image into a window rotated left.
void | swim_put_right_image (SWIM_WINDOW_T *win, const COLOR_T *image, int32_t xsize, int32_t ysize)
| Puts a raw image into a window rotated right.
void | swim_put_scale_image (SWIM_WINDOW_T *win, const COLOR_T *image, int32_t xsize, int32_t ysize)
| Puts and scales a raw image into a window.
void | swim_put_scale_invert_image (SWIM_WINDOW_T *win, const COLOR_T *image, int32_t xsize, int32_t ysize)
| Puts and scales a raw image into a window inverted.
void | swim_put_scale_left_image (SWIM_WINDOW_T *win, const COLOR_T *image, int32_t xsize, int32_t ysize)
| Puts and scales a raw image into a window rotated left.
void | swim_put_scale_right_image (SWIM_WINDOW_T *win, const COLOR_T *image, int32_t xsize, int32_t ysize)
| Puts and scales a raw image into a window rotated right.
void | swim_put_win_image (SWIM_WINDOW_T *win, const COLOR_T *image, int32_t xsize, int32_t ysize, int32_t scale, SWIM_ROTATION_T rtype)
| SWIM image draw composite function.

## Enumeration Type Documentation

enum SWIM_ROTATION_T

Image rotation tags

Enumerator:

  NOROTATION |
  RIGHT |
  INVERT |
  LEFT |

Definition at line 56 of file lpc_swim_image.h.

## Function Documentation

void swim_put_image | ( | SWIM_WINDOW_T * | win,
|  | const COLOR_T * | image,
|  | int32_t | xsize,
|  | int32_t | ysize
| ) |  |

Puts a raw image into a window.

Parameters

  win | : Pointer to window data structure
  image | : Pointer to raw image data
  xsize | : Horizontal size of image data
  ysize | : Vertical size of image data

Returns
  Nothing

Note
  Places an image in the upper left corner of the window. Image is cropped to the window size.

Definition at line 52 of file lpc_swim_image.c.

void swim_put_invert_image | ( | SWIM_WINDOW_T * | win,
|  | const COLOR_T * | image,
|  | int32_t | xsize,
|  | int32_t | ysize
| ) |  |

Puts a raw image into a window inverted.

Parameters

  win | : Pointer to window data structure
  image | : Pointer to raw image data
  xsize | : Horizontal size of image data
  ysize | : Vertical size of image data

Returns
  Nothing

Note
  Places an image in the upper left corner of the window, but inverts it. Image is cropped to the window size.

Definition at line 88 of file lpc_swim_image.c.

void swim_put_left_image | ( | SWIM_WINDOW_T * | win,
|  | const COLOR_T * | image,
|  | int32_t | xsize,
|  | int32_t | ysize
| ) |  |

Puts a raw image into a window rotated left.

Parameters

  win | : Pointer to window data structure
  image | : Pointer to raw image data
  xsize | : Horizontal size of image data
  ysize | : Vertical size of image data

Returns
  Nothing

Note
  Places an image in the upper left corner of the window, but rotates it 90 degrees left. Image is cropped to the window size.

Definition at line 120 of file lpc_swim_image.c.

void swim_put_right_image | ( | SWIM_WINDOW_T * | win,
|  | const COLOR_T * | image,
|  | int32_t | xsize,
|  | int32_t | ysize
| ) |  |

Puts a raw image into a window rotated right.

Parameters

  win | : Pointer to window data structure
  image | : Pointer to raw image data
  xsize | : Horizontal size of image data
  ysize | : Vertical size of image data

Returns
  Nothing

Note
  Places an image in the upper left corner of the window, but rotates it 90 degrees right. Image is cropped to the window size.

Definition at line 156 of file lpc_swim_image.c.

void swim_put_scale_image | ( | SWIM_WINDOW_T * | win,
|  | const COLOR_T * | image,
|  | int32_t | xsize,
|  | int32_t | ysize
| ) |  |

Puts and scales a raw image into a window.

Parameters

  win | : Pointer to window data structure
  image | : Pointer to raw image data
  xsize | : Horizontal size of image data
  ysize | : Vertical size of image data

Returns
  Nothing

Note
  Scales the image to the current window. Image will be increased or decreased in size to fit completely in the window.

Definition at line 191 of file lpc_swim_image.c.

void swim_put_scale_invert_image | ( | SWIM_WINDOW_T * | win,
|  | const COLOR_T * | image,
|  | int32_t | xsize,
|  | int32_t | ysize
| ) |  |

Puts and scales a raw image into a window inverted.

Parameters

  win | : Pointer to window data structure
  image | : Pointer to raw image data
  xsize | : Horizontal size of image data
  ysize | : Vertical size of image data

Returns
  Nothing

Note
  Scales and inverts the image to the current window. Image will be increased or decreased in size to fit in the window.

Definition at line 225 of file lpc_swim_image.c.

void swim_put_scale_left_image | ( | SWIM_WINDOW_T * | win,
|  | const COLOR_T * | image,
|  | int32_t | xsize,
|  | int32_t | ysize
| ) |  |

Puts and scales a raw image into a window rotated left.

Parameters

  win | : Pointer to window data structure
  image | : Pointer to raw image data
  xsize | : Horizontal size of image data
  ysize | : Vertical size of image data

Returns
  Nothing

Note
  Scales and rotates 90 degrees left the image to the current window. Image will be increased or decreased in size to fit in the window.

Definition at line 259 of file lpc_swim_image.c.

void swim_put_scale_right_image | ( | SWIM_WINDOW_T * | win,
|  | const COLOR_T * | image,
|  | int32_t | xsize,
|  | int32_t | ysize
| ) |  |

Puts and scales a raw image into a window rotated right.

Parameters

  win | : Pointer to window data structure
  image | : Pointer to raw image data
  xsize | : Horizontal size of image data
  ysize | : Vertical size of image data

Returns
  Nothing

Note
  Scales and rotates 90 degrees right the image to the current window. Image will be increased or decreased in size to fit in the window.

Definition at line 293 of file lpc_swim_image.c.

void swim_put_win_image | ( | SWIM_WINDOW_T * | win,
|  | const COLOR_T * | image,
|  | int32_t | xsize,
|  | int32_t | ysize,
|  | int32_t | scale,
|  | SWIM_ROTATION_T | rtype
| ) |  |

SWIM image draw composite function.

Parameters

  win | : Pointer to window data structure
  image | : Pointer to raw image data
  xsize | : Horizontal size of image data
  ysize | : Vertical size of image data
  scale | : Set to 1 to scale, or 0 for cropping
  rtype | : Image rotation type

Returns
  Nothing

Note
  This function provides a simple call that supports all SWIM image functions.

Definition at line 327 of file lpc_swim_image.c.