http://www.w3.org/TR/html4/loose.dtd">
|
StdGUI Drawing Functions |
|
int plot_pixel(GRAPHIC *p_graph, int p_x, int p_y, COLOR p_color); int plot_char(GRAPHIC*p_graph, int p_x, int p_y, char p_ch, FONT p_font); int plot_str(GRAPHIC *p_graph, int p_x, int p_y, char *p_str, FONT p_font); int plot_image(GRAPHIC *p_graph, int p_x, int p_y, IMAGE *p_img); int draw_picture(GRAPHIC *p_graph, int p_x, int p_y, int p_width, int p_height, PICTURE *p_pict); int draw_line(GRAPHIC *p_graph, int p_x0, int p_y0, int p_x1, int p_y1); int draw_rect(GRAPHIC *p_graph, int p_x0, int p_y0, int p_x1, int p_y1); int draw_cham(GRAPHIC *p_graph, int p_x0, int p_y0, int p_x1, int p_y1, int p_r); int draw_arc(GRAPHIC *p_graph, int p_x0, int p_y0, int p_x1, int p_y1, int p_a0, int p_a1, int p_mode); int draw_poly(GRAPHIC *p_graph, int p_count, int p_x, int p_y); int draw_curve(GRAPHIC *p_graph, int p_count, int p_x, int p_y); int fill_rect(GRAPHIC *p_graph, int p_x0, int p_y0, int p_x1, int p_y1); int fill_cham(GRAPHIC *p_graph, int p_x0, int p_y0, int p_x1, int p_y1, int p_r); int fill_arc(GRAPHIC *p_graph, int p_x0, int p_y0, int p_x1, int p_y1, int p_a0, int p_a1, int p_mode); int fill_poly(GRAPHIC *p_graph, int p_count, int p_x, int p_y); int fill_curve(GRAPHIC *p_graph, int p_count, int p_x, int p_y); int touch_rect(GRAPHIC *p_graph, int p_x0, int p_y0, int p_x1, int p_y1); int erase_rect(GRAPHIC *p_graph, int p_x0, int p_y0, int p_x1, int p_y1); |
|
The functions fall into four groups: The plot functions place a primitive onto the graphic at the specified position with the specified attributes (color or font) regardless of the current graphic settings. The draw functions draw (trace the outline of) a geometric shape on graphic based on the current settings (pen size, pen shape, foreground color and background color). The one exception to this is the draw_picture() function, which is really a plot function, but plot_picture just doesn’t sound right. The fill functions mirror most of the draw functions (except for draw_line() for which a fill-counterpart doesn’t make any sense) except that the geometric shape is filled rather than drawn. |
|
All drawing functions return zero (0) on success, non-zero on failure. |
|
Jeffrey Dutky |