GRASS Programmer's Manual  6.4.2(2012)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
draw2.c File Reference
#include <math.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/raster.h>
#include <grass/display.h>
Include dependency graph for draw2.c:

Go to the source code of this file.

Data Structures

struct  rectangle
struct  vector
struct  plane

Macros

#define min(x, y)   ((x) < (y) ? (x) : (y))
#define max(x, y)   ((x) > (y) ? (x) : (y))
#define round(x)   ((int) floor(0.5 + (x)))

Functions

void D_set_clip (double t, double b, double l, double r)
 set clipping window
void D_clip_to_map (void)
 set clipping window to map window
void D_move_clip (double x, double y)
 move to pixel
int D_cont_clip (double x, double y)
void D_polydots_clip (const double *x, const double *y, int n)
void D_polyline_cull (const double *x, const double *y, int n)
void D_polyline_clip (const double *x, const double *y, int n)
void D_polygon_cull (const double *x, const double *y, int n)
void D_polygon_clip (const double *x, const double *y, int n)
void D_box_clip (double x1, double y1, double x2, double y2)
void D_move (double x, double y)
void D_cont (double x, double y)
void D_polydots (const double *x, const double *y, int n)
void D_polyline (const double *x, const double *y, int n)
void D_polygon (const double *x, const double *y, int n)
void D_box (double x1, double y1, double x2, double y2)
void D_line_width (double d)

Macro Definition Documentation

#define max (   x,
 
)    ((x) > (y) ? (x) : (y))

Definition at line 69 of file draw2.c.

Referenced by c_max(), c_maxx(), c_mode(), c_range(), class_discont(), class_frequencies(), class_interval(), gui_modules.psmap.PsMapBufferedWindow::ComputeZoom(), D_box(), D_set_clip(), db_dirent(), gui_modules.mapdisp_window.BufferedWindow::Draw(), gui_modules.wxvdriver.DisplayDriver::DrawMap(), gui_modules.psmap_dialogs.VectorLegend::EstimateSize(), gui_modules.psmap_dialogs.RasterLegend::EstimateWidth(), extreme(), G__lookup_colors(), G_abs_log_colors(), G_add_modular_color_rule(), G_add_modular_d_raster_color_rule(), G_add_modular_f_raster_color_rule(), G_add_modular_raster_color_rule(), G_ask_colors(), G_histogram_eq_colors(), G_histogram_eq_colors_fp(), G_log_colors(), G_ls_format(), G_number_of_cats(), G_put_reclass(), G_read_colors(), G_set_d_color_range(), gui_modules.wxvdriver.DisplayDriver::GetThreshold(), Gs_build_256lookup(), Gs_numtype(), Gs_update_attrange(), gsd_do_scale(), gsd_model2real(), gsd_model2surf(), gsd_put_legend(), gsd_real2model(), gvl_file_newh(), I_list_group(), I_list_subgroup(), gui_modules.wxvdigit.IVDigit::InitCats(), iso_calc_cube(), gui_modules.mapdisp_window.BufferedWindow::MouseDraw(), N_les_pivot_create(), Nviz_set_attr(), Nviz_set_volume_attr_default(), gui_modules.dbm.AttributeManager::OnDataItemAdd(), gui_modules.vdigit.VDigitCategoryDialog::OnFeature(), gui_modules.menuform.cmdPanel::OnSize(), gui_modules.gcmd::recv_some(), gui_modules.histogram.BufferedWindow::SaveToFile(), gui_modules.mapdisp_window.BufferedWindow::SaveToFile(), gui_modules.vdigit.VDigitCategoryDialog::UpdateDialog(), gui_modules.dbm.AttributeManager::UpdateDialog(), Vect_cat_in_cat_list(), Vect_get_point_in_poly_isl(), Vect_str_to_cat_list(), Vedit_modify_cats(), w_max(), and w_mode().


Function Documentation

void D_box ( double  x1,
double  y1,
double  x2,
double  y2 
)

Definition at line 834 of file draw2.c.

References D_u_to_d_col(), D_u_to_d_row(), max, min, R_box_abs(), and round.

void D_box_clip ( double  x1,
double  y1,
double  x2,
double  y2 
)

Definition at line 786 of file draw2.c.

References D_clip_to_map(), and D_is_lat_lon().

void D_clip_to_map ( void  )

set clipping window to map window

Sets the clipping window to the pixel window that corresponds to the current database region. This is the default.

Parameters:
~

Definition at line 337 of file draw2.c.

References D_get_u_east(), D_get_u_north(), D_get_u_south(), D_get_u_west(), and D_set_clip().

Referenced by D_box_clip(), D_cont_clip(), D_polydots_clip(), D_polygon_clip(), D_polygon_cull(), D_polyline_clip(), and D_polyline_cull().

void D_cont ( double  x,
double  y 
)

Definition at line 805 of file draw2.c.

References D_u_to_d_col(), D_u_to_d_row(), R_cont_abs(), and round.

int D_cont_clip ( double  x,
double  y 
)

Definition at line 424 of file draw2.c.

References D_clip_to_map(), D_is_lat_lon(), vector::x, and vector::y.

void D_line_width ( double  d)

Definition at line 848 of file draw2.c.

References R_line_width(), round, and gui_modules.psmap_dialogs::w.

void D_move ( double  x,
double  y 
)

Definition at line 797 of file draw2.c.

References D_u_to_d_col(), D_u_to_d_row(), R_move_abs(), and round.

void D_move_clip ( double  x,
double  y 
)

move to pixel

Move without drawing to pixel location x,y, even if it falls outside the clipping window.

Parameters:
x
y

Definition at line 353 of file draw2.c.

References vector::x, and vector::y.

void D_polydots ( const double *  x,
const double *  y,
int  n 
)

Definition at line 813 of file draw2.c.

References R_polydots_abs().

void D_polydots_clip ( const double *  x,
const double *  y,
int  n 
)
void D_polygon ( const double *  x,
const double *  y,
int  n 
)

Definition at line 827 of file draw2.c.

References R_polygon_abs().

void D_polygon_clip ( const double *  x,
const double *  y,
int  n 
)

Definition at line 742 of file draw2.c.

References D_clip_to_map(), and D_is_lat_lon().

void D_polygon_cull ( const double *  x,
const double *  y,
int  n 
)

Definition at line 661 of file draw2.c.

References D_clip_to_map(), and D_is_lat_lon().

void D_polyline ( const double *  x,
const double *  y,
int  n 
)

Definition at line 820 of file draw2.c.

References R_polyline_abs().

void D_polyline_clip ( const double *  x,
const double *  y,
int  n 
)

Definition at line 572 of file draw2.c.

References D_clip_to_map(), and D_is_lat_lon().

void D_polyline_cull ( const double *  x,
const double *  y,
int  n 
)

Definition at line 550 of file draw2.c.

References D_clip_to_map(), and D_is_lat_lon().

void D_set_clip ( double  t,
double  b,
double  l,
double  r 
)

set clipping window

Sets the clipping window to the pixel window that corresponds to the current database region. This is the default.

Parameters:
top
bottom
left
right

Definition at line 313 of file draw2.c.

References rectangle::bot, plane::k, rectangle::left, max, min, rectangle::rite, and rectangle::top.

Referenced by D_clip_to_map().