GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71933
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
draw2.c File Reference
#include <math.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/display.h>
#include <grass/glocale.h>
#include "driver.h"
#include "path.h"
#include "clip.h"
Include dependency graph for draw2.c:

Go to the source code of this file.

Macros

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

Functions

void D_set_clip (double t, double b, double l, double r)
 set clipping window More...
 
void D_clip_to_map (void)
 set clipping window to map window More...
 
void D_set_clip_mode (int mode)
 
void D_set_reduction (double e)
 
void D_line_width (double d)
 
void D_get_text_box (const char *text, double *t, double *b, double *l, double *r)
 
void D_pos_abs (double x, double y)
 
void D_pos_rel (double x, double y)
 
void D_begin (void)
 
void D_end (void)
 
void D_move_abs (double x, double y)
 
void D_cont_abs (double x, double y)
 
void D_close (void)
 
void D_stroke (void)
 
void D_fill (void)
 
void D_dots (void)
 
void D_polyline_abs (const double *x, const double *y, int n)
 
void D_polygon_abs (const double *x, const double *y, int n)
 
void D_polydots_abs (const double *x, const double *y, int n)
 
void D_line_abs (double x1, double y1, double x2, double y2)
 
void D_box_abs (double x1, double y1, double x2, double y2)
 
void D_move_rel (double x, double y)
 
void D_cont_rel (double x, double y)
 
void D_polydots_rel (const double *x, const double *y, int n)
 
void D_polyline_rel (const double *x, const double *y, int n)
 
void D_polygon_rel (const double *x, const double *y, int n)
 
void D_line_rel (double x1, double y1, double x2, double y2)
 
void D_box_rel (double x2, double y2)
 

Macro Definition Documentation

#define min (   x,
 
)    ((x) < (y) ? (x) : (y))

Function Documentation

void D_begin ( void  )

Definition at line 291 of file draw2.c.

References path_begin().

Referenced by D_box_abs(), and D_line_abs().

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

Definition at line 408 of file draw2.c.

References D_begin(), D_close(), D_cont_abs(), D_end(), D_fill(), and D_move_abs().

Referenced by D_box_rel().

void D_box_rel ( double  x2,
double  y2 
)

Definition at line 485 of file draw2.c.

References D_box_abs().

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 171 of file draw2.c.

References b, D_get_src(), D_set_clip(), l, r, and t.

Referenced by D_dots().

void D_close ( void  )

Definition at line 318 of file draw2.c.

References path_close().

Referenced by D_box_abs(), D_polygon_abs(), and D_polygon_rel().

void D_cont_abs ( double  x,
double  y 
)

Definition at line 310 of file draw2.c.

References path_cont(), x, and vertex::y.

Referenced by D_box_abs(), D_cont_rel(), and D_line_abs().

void D_cont_rel ( double  x,
double  y 
)

Definition at line 444 of file draw2.c.

References D_cont_abs().

void D_dots ( void  )
void D_end ( void  )

Definition at line 296 of file draw2.c.

Referenced by D_box_abs(), and D_line_abs().

void D_fill ( void  )

Definition at line 329 of file draw2.c.

References COM_Fill().

Referenced by D_box_abs(), D_polygon_abs(), and D_polygon_rel().

void D_get_text_box ( const char *  text,
double *  t,
double *  b,
double *  l,
double *  r 
)

Definition at line 194 of file draw2.c.

References b, COM_Get_text_box(), D_d_to_u_col(), D_d_to_u_row(), l, r, and t.

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

Definition at line 399 of file draw2.c.

References D_begin(), D_cont_abs(), D_end(), D_move_abs(), and D_stroke().

Referenced by D_line_rel().

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

Definition at line 468 of file draw2.c.

References D_line_abs().

void D_line_width ( double  d)

Definition at line 189 of file draw2.c.

References COM_Line_width().

void D_move_abs ( double  x,
double  y 
)

Definition at line 302 of file draw2.c.

References path_move(), x, and vertex::y.

Referenced by D_box_abs(), D_line_abs(), and D_move_rel().

void D_move_rel ( double  x,
double  y 
)

Definition at line 439 of file draw2.c.

References D_move_abs().

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

Definition at line 393 of file draw2.c.

References D_dots().

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

Definition at line 449 of file draw2.c.

References D_dots().

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

Definition at line 386 of file draw2.c.

References D_close(), and D_fill().

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

Definition at line 461 of file draw2.c.

References D_close(), and D_fill().

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

Definition at line 380 of file draw2.c.

References D_stroke().

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

Definition at line 455 of file draw2.c.

References D_stroke().

void D_pos_abs ( double  x,
double  y 
)

Definition at line 218 of file draw2.c.

References COM_Pos_abs(), D_u_to_d_col(), D_u_to_d_row(), x, and vertex::y.

Referenced by D_pos_rel().

void D_pos_rel ( double  x,
double  y 
)

Definition at line 229 of file draw2.c.

References D_pos_abs().

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
ttop
bbottom
lleft
rright

Definition at line 152 of file draw2.c.

References max, min, and clip::top.

Referenced by D_clip_to_map().

void D_set_clip_mode ( int  mode)

Definition at line 179 of file draw2.c.

References vertex::mode.

void D_set_reduction ( double  e)

Definition at line 184 of file draw2.c.

void D_stroke ( void  )

Definition at line 323 of file draw2.c.

References COM_Stroke().

Referenced by D_line_abs(), D_polyline_abs(), and D_polyline_rel().