Compounds | |
struct | gdm_point |
Defines | |
#define | GDM_LINE 0 |
#define | GDM_POLYGON 1 |
#define | GDM_SEGMENT 2 |
Typedefs | |
typedef gdm_point | gdm_point |
Functions | |
void | gdm_draw_point (gdm_display *dp, short x, short y) |
void | gdm_draw_points (gdm_display *dp, gdm_point *pts, unsigned short npoints) |
void | gdm_draw_line (gdm_display *dp, short x1, short y1, short x2, short y2) |
void | gdm_draw_lines (gdm_display *dp, gdm_point *pts, unsigned short npoints, short mode) |
void | gdm_fill_rectangle (gdm_display *dp, short x, short y, unsigned short width, unsigned short height) |
Each drawing operation is made using a graphical context. The graphical context defines the logical operation which is used when drawing the item (see gdm_set_gc in Management and Control API). The following operations are supported:
All the drawing operation implement a clipping mechanism to restrict the drawing to the LCD screen and optionally a region that you specify. The coordinates can be outside of the LCD screen and outside of the clipping region. Drawing will take place only within the clipping region. For example, it is safe to do:
static gdm_display display; ... / * Clear screen. * / gdm_set_gc (&display, GDM_PLOT_AND); gdm_fill_rectangle (&display, -100, -200, 1024, 2048); / * Draw a line crossing the screen. * / gdm_set_gc (&display, GDM_PLOT_OR); gdm_draw_line (&display, -100, -200, 1024, 2048);
|
Draw a continuous line. |
|
Draw a continuous closed line (polygon). |
|
Draw several segments. |
|
Representation of a point. |
|
Draw a line between two points. Draw a line between x1, y1 and x2, y2. The line is clipped to the display window and using the current clipping region. The points of the line are drawn using the current graphical context (or, and, xor).
|
|
Draw a continuous line, some segments or a polygon. Draw a continuous line, a set of segments or a polygon based on the list of points specified in pts. The mode parameter controls the drawing mode: GDM_LINE A continuous line is drawn between each point of the list. GDM_POLYGON The continous line is closed to form a polygon GDM_SEGMENT The list of points represents couples of points to define one or several segments. npoints / 2 segments are drawn.
|
|
Draw a point on the graphic display. The point at x, y is plotted using the current color and graphic operation. The point is clipped to the current display clipping region. The point is plotted in the bitmap only and a display refresh is necessary to make the change visible.
|
|
Draw a list of points on the graphic display. The points specified in the table pts are plotted using the current color and graphic operation. The points are clipped to the current display clipping region. The point is plotted in the bitmap only and a display refresh is necessary to make the change visible.
|
|
Fill a rectangle with current gc mode. The rectangle defined by x, y, width, height is filled with the current graphical context. The rectangle is clipped to the display and to the optional clipping region.
|