GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
display/setup.c File Reference
#include <string.h>
#include <grass/gis.h>
#include <grass/display.h>
#include <grass/raster.h>
Include dependency graph for display/setup.c:

Go to the source code of this file.


int D_setup (int clear)
 initialize/create a frame More...

Function Documentation

int D_setup ( int  clear)

initialize/create a frame

This routine performs a series of initialization steps for the current frame. It also creates a full screen frame if there is no current frame. The clear flag, if set to 1, tells this routine to clear any information associated with the frame: graphics as well as region information. This routine relieves the programmer of having to perform the following idiomatic function call sequence


graphics frame setup

Performs a full setup for the current graphics frame: 1) Makes sure there is a current graphics frame (will create a full-screen one, if not); 2) Sets the region coordinates so that the graphics frame and the active module region agree (may change active module region to do this); and 3) performs graphic frame/region coordinate conversion initialization. If clear is true, the frame is cleared (same as running d.erase.) Otherwise, it is not cleared.


Definition at line 59 of file display/setup.c.

References b, D_check_map_window(), D_clear_window(), D_do_conversions(), D_get_cur_wind(), D_get_screen_window(), D_move_abs(), D_new_window(), D_set_cur_wind(), D_translate_color(), G_fatal_error(), G_get_set_window(), G_set_window(), l, render::name, r, R_box_abs(), R_move_abs(), R_screen_bot(), R_screen_left(), R_screen_rite(), R_screen_top(), R_set_window(), and R_standard_color().