GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Go to the source code of this file.
Data Structures | |
struct | transport |
Functions | |
void | LOC_get_location_with_box (int cx, int cy, int *wx, int *wy, int *button) |
void | LOC_get_location_with_line (int cx, int cy, int *wx, int *wy, int *button) |
void | LOC_get_location_with_pointer (int *wx, int *wy, int *button) |
int | LOC_open_driver (void) |
int | LOC__open_quiet (void) |
void | LOC_stabilize (void) |
void | LOC_kill_driver (void) |
void | LOC_close_driver (void) |
void | LOC_release_driver (void) |
int | LOC_pad_create (const char *pad) |
int | LOC_pad_current (char *name) |
int | LOC_pad_delete (void) |
int | LOC_pad_invent (char *pad) |
int | LOC_pad_list (char ***list, int *count) |
int | LOC_pad_select (const char *pad) |
int | LOC_pad_append_item (const char *item, const char *value, int replace) |
int | LOC_pad_delete_item (const char *name) |
int | LOC_pad_get_item (const char *name, char ***list, int *count) |
int | LOC_pad_list_items (char ***list, int *count) |
int | LOC_pad_set_item (const char *name, const char *value) |
int | LOC_screen_left (void) |
screen left edge More... | |
int | LOC_screen_rite (void) |
screen right edge More... | |
int | LOC_screen_bot (void) |
bottom of screen More... | |
int | LOC_screen_top (void) |
top of screen More... | |
void | LOC_get_num_colors (int *n) |
void | LOC_standard_color (int index) |
select standard color More... | |
void | LOC_RGB_color (unsigned char red, unsigned char grn, unsigned char blu) |
select color More... | |
void | LOC_line_width (int width) |
change the width of line More... | |
void | LOC_erase (void) |
erase screen More... | |
void | LOC_move_abs (int x, int y) |
move current location More... | |
void | LOC_move_rel (int x, int y) |
move current location More... | |
void | LOC_cont_abs (int x, int y) |
draw line More... | |
void | LOC_cont_rel (int x, int y) |
draw line More... | |
void | LOC_polydots_abs (const int *xarray, const int *yarray, int number) |
draw a series of dots More... | |
void | LOC_polydots_rel (const int *xarray, const int *yarray, int number) |
draw a series of dots More... | |
void | LOC_polyline_abs (const int *xarray, const int *yarray, int number) |
draw an open polygon More... | |
void | LOC_polyline_rel (const int *xarray, const int *yarray, int number) |
draw an open polygon More... | |
void | LOC_polygon_abs (const int *xarray, const int *yarray, int number) |
draw a closed polygon More... | |
void | LOC_polygon_rel (const int *xarray, const int *yarray, int number) |
draw a closed polygon More... | |
void | LOC_box_abs (int x1, int y1, int x2, int y2) |
fill a box More... | |
void | LOC_box_rel (int x, int y) |
fill a box More... | |
void | LOC_text_size (int width, int height) |
set text size More... | |
void | LOC_text_rotation (float rotation) |
void | LOC_set_window (int t, int b, int l, int r) |
set text clipping frame More... | |
void | LOC_text (const char *text) |
write text More... | |
void | LOC_get_text_box (const char *text, int *t, int *b, int *l, int *r) |
get text extents More... | |
void | LOC_font (const char *name) |
choose font More... | |
void | LOC_charset (const char *name) |
void | LOC_font_list (char ***list, int *count) |
void | LOC_font_info (char ***list, int *count) |
void | LOC_panel_save (const char *name, int t, int b, int l, int r) |
void | LOC_panel_restore (const char *name) |
void | LOC_panel_delete (const char *name) |
void | LOC_begin_scaled_raster (int mask, int src[2][2], int dst[2][2]) |
int | LOC_scaled_raster (int n, int row, const unsigned char *red, const unsigned char *grn, const unsigned char *blu, const unsigned char *nul) |
void | LOC_end_scaled_raster (void) |
void | LOC_bitmap (int ncols, int nrows, int threshold, const unsigned char *buf) |
void | REM_get_location_with_box (int cx, int cy, int *wx, int *wy, int *button) |
void | REM_get_location_with_line (int cx, int cy, int *wx, int *wy, int *button) |
void | REM_get_location_with_pointer (int *wx, int *wy, int *button) |
int | REM_open_driver (void) |
int | REM__open_quiet (void) |
void | REM_stabilize (void) |
void | REM_kill_driver (void) |
void | REM_close_driver (void) |
void | REM_release_driver (void) |
int | REM_pad_create (const char *pad) |
int | REM_pad_current (char *name) |
int | REM_pad_delete (void) |
int | REM_pad_invent (char *pad) |
int | REM_pad_list (char ***list, int *count) |
int | REM_pad_select (const char *pad) |
int | REM_pad_append_item (const char *item, const char *value, int replace) |
int | REM_pad_delete_item (const char *name) |
int | REM_pad_get_item (const char *name, char ***list, int *count) |
int | REM_pad_list_items (char ***list, int *count) |
int | REM_pad_set_item (const char *name, const char *value) |
int | REM_screen_left (void) |
int | REM_screen_rite (void) |
int | REM_screen_bot (void) |
int | REM_screen_top (void) |
void | REM_get_num_colors (int *n) |
void | REM_standard_color (int index) |
void | REM_RGB_color (unsigned char red, unsigned char grn, unsigned char blu) |
void | REM_line_width (int width) |
void | REM_erase (void) |
void | REM_move_abs (int x, int y) |
void | REM_move_rel (int x, int y) |
void | REM_cont_abs (int x, int y) |
void | REM_cont_rel (int x, int y) |
void | REM_polydots_abs (const int *xarray, const int *yarray, int number) |
void | REM_polydots_rel (const int *xarray, const int *yarray, int number) |
void | REM_polyline_abs (const int *xarray, const int *yarray, int number) |
void | REM_polyline_rel (const int *xarray, const int *yarray, int number) |
void | REM_polygon_abs (const int *xarray, const int *yarray, int number) |
void | REM_polygon_rel (const int *xarray, const int *yarray, int number) |
void | REM_box_abs (int x1, int y1, int x2, int y2) |
void | REM_box_rel (int x, int y) |
void | REM_text_size (int width, int height) |
void | REM_text_rotation (float rotation) |
void | REM_set_window (int t, int b, int l, int r) |
void | REM_text (const char *text) |
void | REM_get_text_box (const char *text, int *t, int *b, int *l, int *r) |
void | REM_font (const char *name) |
void | REM_charset (const char *name) |
void | REM_font_list (char ***list, int *count) |
void | REM_font_info (char ***list, int *count) |
void | REM_panel_save (const char *name, int t, int b, int l, int r) |
void | REM_panel_restore (const char *name) |
void | REM_panel_delete (const char *name) |
void | REM_begin_scaled_raster (int mask, int src[2][2], int dst[2][2]) |
int | REM_scaled_raster (int n, int row, const unsigned char *red, const unsigned char *grn, const unsigned char *blu, const unsigned char *nul) |
void | REM_end_scaled_raster (void) |
void | REM_bitmap (int ncols, int nrows, int threshold, const unsigned char *buf) |
Variables | |
struct transport * | trans |
Definition at line 538 of file loc_proto.c.
References COM_begin_scaled_raster().
Definition at line 555 of file loc_proto.c.
References COM_Bitmap().
fill a box
A box is drawn in the current color using the coordinates x1,y1 and x2,y2 as opposite corners of the box. The current location is undefined afterwards
x1 | |
y1 | |
x2 | |
y2 |
Definition at line 366 of file loc_proto.c.
References COM_Box_abs().
fill a box
A box is drawn in the current color using the current location as one corner and the current location plus x and y as the opposite corner of the box. The current location is undefined afterwards.
x | |
y |
Definition at line 384 of file loc_proto.c.
References COM_Box_rel().
void LOC_charset | ( | const char * | name | ) |
Definition at line 501 of file loc_proto.c.
References COM_Font_init_charset().
void LOC_close_driver | ( | void | ) |
Definition at line 85 of file loc_io.c.
References COM_Client_Close(), LOC_kill_driver(), and LOC_stabilize().
draw line
Draw a line using the current color, selected via R_color, from the current location to the location specified by x,y. The current location is updated to x,y.
x | |
y |
Definition at line 206 of file loc_proto.c.
References COM_Cont_abs().
draw line
Draw a line using the current color, selected via R_color, from the current location to the relative location specified by x and y. The current location is updated:
x | |
y |
Definition at line 228 of file loc_proto.c.
References COM_Cont_rel().
void LOC_end_scaled_raster | ( | void | ) |
Definition at line 550 of file loc_proto.c.
References COM_end_scaled_raster().
void LOC_erase | ( | void | ) |
erase screen
Erases the entire screen to black.
void |
Definition at line 153 of file loc_proto.c.
References COM_Erase().
void LOC_font | ( | const char * | name | ) |
choose font
Set current font to font name. Available fonts are:
Font Name | Description |
cyrilc | cyrillic |
gothgbt | Gothic Great Britain triplex |
gothgrt | Gothic German triplex |
gothitt | Gothic Italian triplex |
greekc | Greek complex |
greekcs | Greek complex script |
greekp | Greek plain |
greeks | Greek simplex |
italicc | Italian complex |
italiccs | Italian complex small |
italict | Italian triplex |
romanc | Roman complex |
romancs | Roman complex small |
romand | Roman duplex |
romanp | Roman plain |
romans | Roman simplex |
romant | Roman triplex |
scriptc | Script complex |
scripts | Script simplex |
name |
Definition at line 496 of file loc_proto.c.
References COM_Font_get().
void LOC_font_info | ( | char *** | list, |
int * | count | ||
) |
Definition at line 511 of file loc_proto.c.
References COM_Font_info().
void LOC_font_list | ( | char *** | list, |
int * | count | ||
) |
Definition at line 506 of file loc_proto.c.
References COM_Font_list().
void LOC_get_num_colors | ( | int * | n | ) |
Definition at line 89 of file loc_proto.c.
References COM_Number_of_colors().
get text extents
The extent of the area enclosing the text is returned in the integer pointers top, bottom, left, and right. No text is actually drawn. This is useful for capturing the text extent so that the text location can be prepared with proper background or border.
sometext | |
t | top |
b | bottom |
l | left |
r | right |
Definition at line 459 of file loc_proto.c.
References COM_Get_text_box().
void LOC_kill_driver | ( | void | ) |
Definition at line 80 of file loc_io.c.
References COM_Graph_close().
Referenced by LOC_close_driver().
void LOC_line_width | ( | int | width | ) |
change the width of line
Changes the width of line to be used in subsequent draw commands.
width |
Definition at line 139 of file loc_proto.c.
References COM_Line_width().
move current location
Move the current location to the absolute screen coordinate x,y. Nothing is drawn on the screen.
x | |
y |
Definition at line 169 of file loc_proto.c.
References COM_Move_abs().
move current location
Shift the current screen location by the values in dx and dy:
Nothing is drawn on the screen.
x | dx |
y | dy |
Definition at line 189 of file loc_proto.c.
References COM_Move_rel().
int LOC_open_driver | ( | void | ) |
Definition at line 54 of file loc_io.c.
References COM_Client_Open(), G_strcasecmp(), getenv(), LIB_init(), NULL, OK, PNG_Driver(), and PS_Driver().
int LOC_pad_create | ( | const char * | pad | ) |
Definition at line 23 of file loc_pad.c.
References create_pad(), find_pad(), NO_MEMORY, NULL, and OK.
int LOC_pad_current | ( | char * | name | ) |
Definition at line 35 of file loc_pad.c.
References _pad_::name, NULL, and OK.
int LOC_pad_delete | ( | void | ) |
Definition at line 47 of file loc_pad.c.
References delete_pad(), _pad_::name, NULL, and OK.
int LOC_pad_delete_item | ( | const char * | name | ) |
Definition at line 108 of file loc_pad.c.
References delete_item(), NULL, and OK.
Definition at line 117 of file loc_pad.c.
References find_item(), G_store(), l, _item_::list, n, _list::next, NULL, OK, and _list::value.
int LOC_pad_invent | ( | char * | pad | ) |
Definition at line 60 of file loc_pad.c.
References invent_pad().
Definition at line 67 of file loc_pad.c.
References G_store(), l, n, _pad_::name, _pad_::next, and pad_list().
Definition at line 145 of file loc_pad.c.
References G_store(), _pad_::items, l, n, _item_::name, _item_::next, NULL, and OK.
int LOC_pad_select | ( | const char * | pad | ) |
Definition at line 87 of file loc_pad.c.
References find_pad(), NULL, and OK.
int LOC_pad_set_item | ( | const char * | name, |
const char * | value | ||
) |
Definition at line 167 of file loc_pad.c.
References append_item(), delete_item(), NO_MEMORY, NULL, and OK.
void LOC_panel_delete | ( | const char * | name | ) |
Definition at line 530 of file loc_proto.c.
References COM_Panel_delete(), render::name, and R_stabilize().
void LOC_panel_restore | ( | const char * | name | ) |
Definition at line 524 of file loc_proto.c.
References COM_Panel_restore(), and R_stabilize().
Definition at line 516 of file loc_proto.c.
References COM_Panel_save(), and R_stabilize().
draw a series of dots
Pixels at the num absolute positions in the x and y arrays are turned to the current color. The current location is left updated to the position of the last dot.
xarray | x |
yarray | y |
number |
Definition at line 246 of file loc_proto.c.
References COM_Polydots_abs().
draw a series of dots
Pixels at the number relative positions in the x and y arrays are turned to the current color. The first position is relative to the starting current location; the succeeding positions are then relative to the previous position. The current location is updated to the position of the last dot.
xarray | x |
yarray | y |
number |
Definition at line 266 of file loc_proto.c.
References COM_Polydots_rel().
draw a closed polygon
The number absolute positions in the x and y arrays outline a closed polygon which is filled with the current color. The current location is undefined afterwards.
xarray | x |
yarray | y |
number |
Definition at line 327 of file loc_proto.c.
References COM_Polygon_abs().
draw a closed polygon
The number relative positions in the x and y arrays outline a closed polygon which is filled with the current color. The first position is relative to the starting current location; the succeeding positions are then relative to the previous position. The current location is undefined afterwards.
xarray | x |
yarray | y |
number |
Definition at line 347 of file loc_proto.c.
References COM_Polygon_rel().
draw an open polygon
The number absolute positions in the x and y arrays are used to generate a multisegment line (often curved). This line is drawn with the current color. The current location is left updated to the position of the last point. Note. It is not assumed that the line is closed, i.e., no line is drawn from the last point to the first point.
xarray | x |
yarray | y |
number |
Definition at line 287 of file loc_proto.c.
References COM_Polyline_abs().
draw an open polygon
The number relative positions in the x and y arrays are used to generate a multisegment line (often curved). The first position is relative to the starting current location; the succeeding positions are then relative to the previous position. The current location is updated to the position of the last point. This line is drawn with the current color. Note. No line is drawn between the last point and the first point.
xarray | x |
yarray | y |
number |
Definition at line 309 of file loc_proto.c.
References COM_Polyline_rel().
void LOC_release_driver | ( | void | ) |
Definition at line 92 of file loc_io.c.
References COM_Client_Close(), and LOC_stabilize().
void LOC_RGB_color | ( | unsigned char | red, |
unsigned char | grn, | ||
unsigned char | blu | ||
) |
select color
When in float mode (see R_color_table_float), this call selects the color most closely matched to the red, grn, and blue intensities requested. These values must be in the range of 0-255.
red | |
grn | |
blue |
Definition at line 125 of file loc_proto.c.
References COM_Color_RGB().
int LOC_scaled_raster | ( | int | n, |
int | row, | ||
const unsigned char * | red, | ||
const unsigned char * | grn, | ||
const unsigned char * | blu, | ||
const unsigned char * | nul | ||
) |
Definition at line 543 of file loc_proto.c.
References COM_scaled_raster().
int LOC_screen_bot | ( | void | ) |
bottom of screen
Returns the coordinate of the bottom of the screen.
void |
Definition at line 61 of file loc_proto.c.
References b, and COM_Screen_bot().
int LOC_screen_left | ( | void | ) |
screen left edge
Returns the coordinate of the left edge of the screen.
void |
Definition at line 25 of file loc_proto.c.
References COM_Screen_left(), and l.
int LOC_screen_rite | ( | void | ) |
screen right edge
Returns the coordinate of the right edge of the screen.
void |
Definition at line 43 of file loc_proto.c.
References COM_Screen_rite(), and r.
int LOC_screen_top | ( | void | ) |
top of screen
Returns the coordinate of the top of the screen.
void |
Definition at line 80 of file loc_proto.c.
References COM_Screen_top().
set text clipping frame
Subsequent calls to R_text will have text strings clipped to the screen frame defined by top, bottom, left, right.
t | top |
b | bottom |
l | left |
r | right |
Definition at line 422 of file loc_proto.c.
References COM_Set_window().
void LOC_stabilize | ( | void | ) |
Definition at line 75 of file loc_io.c.
References COM_Respond().
Referenced by LOC_close_driver(), and LOC_release_driver().
void LOC_standard_color | ( | int | index | ) |
select standard color
Selects the standard color to be used in subsequent draw commands. The color value is best retrieved using D_translate_color. See Display_Graphics_Library.
index |
Definition at line 106 of file loc_proto.c.
References COM_Standard_color().
void LOC_text | ( | const char * | text | ) |
write text
Writes text in the current color and font, at the current text width and height, starting at the current screen location.
sometext |
Definition at line 437 of file loc_proto.c.
References COM_Text().
void LOC_text_rotation | ( | float | rotation | ) |
Definition at line 404 of file loc_proto.c.
References COM_Text_rotation().
set text size
Sets text pixel width and height to width and height.
width | |
height |
Definition at line 399 of file loc_proto.c.
References COM_Text_size().
int REM__open_quiet | ( | void | ) |
void REM_charset | ( | const char * | name | ) |
void REM_close_driver | ( | void | ) |
void REM_end_scaled_raster | ( | void | ) |
void REM_erase | ( | void | ) |
void REM_font | ( | const char * | name | ) |
void REM_font_info | ( | char *** | list, |
int * | count | ||
) |
void REM_font_list | ( | char *** | list, |
int * | count | ||
) |
void REM_get_num_colors | ( | int * | n | ) |
void REM_kill_driver | ( | void | ) |
void REM_line_width | ( | int | width | ) |
int REM_open_driver | ( | void | ) |
int REM_pad_create | ( | const char * | pad | ) |
int REM_pad_current | ( | char * | name | ) |
int REM_pad_delete | ( | void | ) |
int REM_pad_delete_item | ( | const char * | name | ) |
int REM_pad_invent | ( | char * | pad | ) |
int REM_pad_select | ( | const char * | pad | ) |
int REM_pad_set_item | ( | const char * | name, |
const char * | value | ||
) |
void REM_panel_delete | ( | const char * | name | ) |
void REM_panel_restore | ( | const char * | name | ) |
void REM_release_driver | ( | void | ) |
void REM_RGB_color | ( | unsigned char | red, |
unsigned char | grn, | ||
unsigned char | blu | ||
) |
int REM_scaled_raster | ( | int | n, |
int | row, | ||
const unsigned char * | red, | ||
const unsigned char * | grn, | ||
const unsigned char * | blu, | ||
const unsigned char * | nul | ||
) |
int REM_screen_bot | ( | void | ) |
int REM_screen_left | ( | void | ) |
int REM_screen_rite | ( | void | ) |
int REM_screen_top | ( | void | ) |
void REM_stabilize | ( | void | ) |
void REM_standard_color | ( | int | index | ) |
void REM_text | ( | const char * | text | ) |
void REM_text_rotation | ( | float | rotation | ) |
struct transport* trans |
Definition at line 143 of file com_io.c.
Referenced by G_plot_icon(), R_begin_scaled_raster(), R_bitmap(), R_box_abs(), R_box_rel(), R_charset(), R_cont_abs(), R_cont_rel(), R_end_scaled_raster(), R_erase(), R_font(), R_font_info(), R_font_list(), R_get_location_with_box(), R_get_location_with_line(), R_get_location_with_pointer(), R_get_num_colors(), R_get_text_box(), R_line_width(), R_move_abs(), R_move_rel(), R_pad_append_item(), R_pad_create(), R_pad_current(), R_pad_delete(), R_pad_delete_item(), R_pad_get_item(), R_pad_invent(), R_pad_list(), R_pad_list_items(), R_pad_select(), R_pad_set_item(), R_panel_delete(), R_panel_restore(), R_panel_save(), R_polydots_abs(), R_polydots_rel(), R_polygon_abs(), R_polygon_rel(), R_polyline_abs(), R_polyline_rel(), R_RGB_color(), R_scaled_raster(), R_screen_bot(), R_screen_left(), R_screen_rite(), R_screen_top(), R_set_window(), R_standard_color(), R_text(), R_text_rotation(), R_text_size(), read_png(), and write_png().