Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

charcanvas.h File Reference

The canvas is an abstraction between the layout and data formatting algorithms on one side, and the device drivers on the other. More...

#include <wchar.h>

Include dependency graph for charcanvas.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  cc_canvas
 The actual canvas. More...

struct  cc_elem
 One cc_elem represents one character element on the device. More...


Functions

cc_canvascc_create_canvas (unsigned int width, unsigned int height)
 Return a new canvas with the given dimensions.

void cc_delete_canvas (cc_canvas *canvas)
 Free all memory of a canvas.

void cc_put_char (cc_canvas *canvas, unsigned int x_pos, unsigned int y_pos, wchar_t character)
 Put a UTF-8 character at the given position.

void cc_write_text (cc_canvas *canvas, unsigned int x_pos, unsigned int y_pos, char *utf8_string)
 Write a UTF-8 string at the given position.

cc_elemcc_get_element (cc_canvas *canvas, unsigned int x_pos, unsigned int y_pos)
 Return the element at the given position.

void cc_clear_damaged_regions (cc_canvas *canvas)
 Reset all damaged region flags (normally done after the canvas was displayed on a device.


Detailed Description

The canvas is an abstraction between the layout and data formatting algorithms on one side, and the device drivers on the other.

All drivers take a canvas as their input, and try to display the bitmap data and unicode text as good as possible within the constraints of the hardware.

Definition in file charcanvas.h.


Function Documentation

void cc_clear_damaged_regions cc_canvas   canvas
 

Reset all damaged region flags (normally done after the canvas was displayed on a device.

Parameters:
canvas  Pointer to the canvas to reset.

Definition at line 97 of file charcanvas.c.

cc_canvas* cc_create_canvas unsigned int    width,
unsigned int    height
 

Return a new canvas with the given dimensions.

All elements are set to a space character initially.

Parameters:
width  Width in characters.
height  Height in characters.
Returns:
A pointer to the newly created canvas.

Definition at line 33 of file charcanvas.c.

void cc_delete_canvas cc_canvas   canvas
 

Free all memory of a canvas.

Parameters:
canvas  Pointer to the canvas to clean up.

Definition at line 57 of file charcanvas.c.

cc_elem* cc_get_element cc_canvas   canvas,
unsigned int    x_pos,
unsigned int    y_pos
 

Return the element at the given position.

Parameters:
canvas  Pointer to the canvas to query.
x_pos  X position, must be smaller than canvas->width.
y_pos  Y position, must be smaller than canvas->height.
Returns:
The pointer to the element at the position (x_pos, y_pos).

Definition at line 90 of file charcanvas.c.

void cc_put_char cc_canvas   canvas,
unsigned int    x_pos,
unsigned int    y_pos,
wchar_t    character
 

Put a UTF-8 character at the given position.

Parameters:
canvas  Pointer to the canvas to draw on.
x_pos  X position, must be smaller than canvas->width.
y_pos  Y position, must be smaller than canvas->height.
character  Unicode character.

Definition at line 72 of file charcanvas.c.

void cc_write_text cc_canvas   canvas,
unsigned int    x_pos,
unsigned int    y_pos,
char *    utf8_string
 

Write a UTF-8 string at the given position.

Parameters:
canvas  Pointer to the canvas to draw on.
x_pos  X position, must be smaller than (canvas->width - length of utf8_string).
y_pos  Y position, must be smaller than canvas->height.
utf8_string  Pointer to a UTF-8 encoded string.

Definition at line 82 of file charcanvas.c.


Generated on Sun Feb 16 23:39:54 2003 for FreeLCD by doxygen1.2.18