GRASS Programmer's Manual 6.4.1(2011)
set_window.c File Reference

Set window. More...

#include <grass/gis.h>
#include <grass/glocale.h>
#include "G.h"
Include dependency graph for set_window.c:

Go to the source code of this file.

Functions

int G_get_set_window (struct Cell_head *window)
 Get the current working window.
int G_set_window (struct Cell_head *window)
 Establishes 'window' as the current working window.

Detailed Description

Set window.

(C) 2001-2008 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author:
GRASS GIS Development Team
Date:
1999-2007

Definition in file set_window.c.


Function Documentation

int G_get_set_window ( struct Cell_head *  window)

Get the current working window.

The current working window values are returned in the structure 'window'.

Parameters:
[out]windowwindow structure to be set
Returns:
1

Definition at line 30 of file set_window.c.

References G__init_window(), G_copy(), and G__::window.

Referenced by G_begin_cell_area_calculations(), G_get_3dview(), G_projection(), G_setup_plot(), and G_zone().

int G_set_window ( struct Cell_head *  window)

Establishes 'window' as the current working window.

Any opened cell files has its file-to-window mapping reworked.

Parameters:
[in]windowwindow to become operative window
Returns:
-1 on error
1 on success

Definition at line 49 of file set_window.c.

References G__::auto_mask, fileinfo::cellhd, G__::fileinfo, G__::fileinfo_count, G__check_for_auto_masking(), G__create_window_mapping(), G__reallocate_mask_buf(), G__reallocate_null_buf(), G__reallocate_temp_buf(), G__reallocate_work_buf(), G_adjust_Cell_head(), G_close_cell(), G_copy(), G_warning(), G__::mask_fd, fileinfo::open_mode, OPEN_NEW_COMPRESSED, OPEN_NEW_RANDOM, OPEN_NEW_UNCOMPRESSED, OPEN_OLD, G__::window, G__::window_set, and XDR_DOUBLE_NBYTES.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines