GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
gsd_fringe.c File Reference
#include <grass/ogsf.h>
#include "gsget.h"
#include "rowcol.h"
Include dependency graph for gsd_fringe.c:

Go to the source code of this file.

Macros

#define FRINGE_FORE   0x000000
 
#define FRINGE_WIDTH   2
 

Functions

void gsd_display_fringe (geosurf *surf, unsigned long clr, float elev, int where[4])
 Display fridge. More...
 
void gsd_fringe_horiz_poly (float bot, geosurf *surf, int row, int side)
 Draw fringe polygon in x direction. More...
 
void gsd_fringe_horiz_line (float bot, geosurf *surf, int row, int side)
 Draw fringe outline in x direction. More...
 
void gsd_fringe_vert_poly (float bot, geosurf *surf, int col, int side)
 Draw fringe outline in y direction. More...
 
void gsd_fringe_vert_line (float bot, geosurf *surf, int col, int side)
 Draw fringe outline in y direction. More...
 
void gsd_fringe_horiz_line2 (float bot, geosurf *surf, int row, int side)
 ADD. More...
 

Variables

float Nnorth [] = { 0.0, 0.8, 0.6 }
 Normals. More...
 
float Nsouth [] = { 0.0, -0.8, 0.6 }
 
float Neast [] = { 0.8, 0.0, 0.6 }
 
float Nwest [] = { -0.8, 0.0, 0.6 }
 
float Ntop [] = { 0.0, 0.0, 1.0 }
 
float Nbottom [] = { 0.0, 0.0, -1.0 }
 

Macro Definition Documentation

◆ FRINGE_FORE

#define FRINGE_FORE   0x000000

Definition at line 26 of file gsd_fringe.c.

◆ FRINGE_WIDTH

#define FRINGE_WIDTH   2

Definition at line 27 of file gsd_fringe.c.

Referenced by gsd_display_fringe().

Function Documentation

◆ gsd_display_fringe()

void gsd_display_fringe ( geosurf surf,
unsigned long  clr,
float  elev,
int  where[4] 
)

Display fridge.

Todo:
add elevation for bottom add color option add ruler grid lines
Parameters
surfsurface (geosurf)
clr
elev
where

Definition at line 51 of file gsd_fringe.c.

References CM_COLOR, FRINGE_WIDTH, gsd_color_func(), gsd_colormode(), gsd_linewidth(), gsd_zwritemask(), Nnorth, VCOLS, VROWS, g_surf::x_mod, g_surf::xmax, g_surf::xres, g_surf::y_mod, g_surf::ymax, g_surf::yres, g_surf::z_exag, and g_surf::zrange.

Referenced by GS_draw_fringe().

◆ gsd_fringe_horiz_line()

void gsd_fringe_horiz_line ( float  bot,
geosurf surf,
int  row,
int  side 
)

Draw fringe outline in x direction.

Parameters
botcoordinate of fringe bottom
surfsurface (geosurf)
rowrow along which is fringe drawn
side

Definition at line 225 of file gsd_fringe.c.

References ATT_TOPO, g_surf::cols, GET_MAPATT, GS_done_draw(), gs_get_att_typbuff(), GS_set_draw(), gsd_bgnline(), gsd_do_scale(), gsd_endline(), gsd_flush(), GSD_FRONT, gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), gsd_vert_func(), g_surf::rows, VCOLS, X, g_surf::x_mod, g_surf::x_trans, g_surf::xres, Y, g_surf::y_mod, g_surf::y_trans, g_surf::yres, Z, g_surf::z_exag, and g_surf::z_trans.

◆ gsd_fringe_horiz_line2()

void gsd_fringe_horiz_line2 ( float  bot,
geosurf surf,
int  row,
int  side 
)

◆ gsd_fringe_horiz_poly()

void gsd_fringe_horiz_poly ( float  bot,
geosurf surf,
int  row,
int  side 
)

Draw fringe polygon in x direction.

Parameters
botcoordinate of fringe bottom
surfsurface (geosurf)
rowrow along which is fringe drawn
side

Definition at line 141 of file gsd_fringe.c.

References ATT_TOPO, g_surf::cols, GET_MAPATT, GS_done_draw(), gs_get_att_typbuff(), GS_set_draw(), gsd_bgnqstrip(), gsd_do_scale(), gsd_endqstrip(), gsd_flush(), GSD_FRONT, gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), gsd_vert_func(), g_surf::rows, VCOLS, X, g_surf::x_mod, g_surf::x_trans, g_surf::xres, Y, g_surf::y_mod, g_surf::y_trans, g_surf::yres, Z, g_surf::z_exag, and g_surf::z_trans.

◆ gsd_fringe_vert_line()

void gsd_fringe_vert_line ( float  bot,
geosurf surf,
int  col,
int  side 
)

Draw fringe outline in y direction.

Parameters
botcoordinate of fringe bottom
surfsurface (geosurf)
colcolumn along which is fringe drawn
side

Definition at line 403 of file gsd_fringe.c.

References ATT_TOPO, g_surf::cols, GET_MAPATT, GS_done_draw(), gs_get_att_typbuff(), GS_set_draw(), gsd_bgnline(), gsd_do_scale(), gsd_endline(), gsd_flush(), GSD_FRONT, gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), gsd_vert_func(), g_surf::rows, VROWS, X, g_surf::x_mod, g_surf::x_trans, g_surf::xres, Y, g_surf::y_mod, g_surf::y_trans, g_surf::yres, Z, g_surf::z_exag, and g_surf::z_trans.

◆ gsd_fringe_vert_poly()

void gsd_fringe_vert_poly ( float  bot,
geosurf surf,
int  col,
int  side 
)

Draw fringe outline in y direction.

Parameters
botcoordinate of fringe bottom
surfsurface (geosurf)
colcolumn along which is fringe drawn
side

Definition at line 321 of file gsd_fringe.c.

References ATT_TOPO, g_surf::cols, GET_MAPATT, GS_done_draw(), gs_get_att_typbuff(), GS_set_draw(), gsd_bgnqstrip(), gsd_do_scale(), gsd_endqstrip(), gsd_flush(), GSD_FRONT, gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), gsd_vert_func(), g_surf::rows, VROWS, X, g_surf::x_mod, g_surf::x_trans, g_surf::xres, Y, g_surf::y_mod, g_surf::y_trans, g_surf::yres, Z, g_surf::z_exag, and g_surf::z_trans.

Variable Documentation

◆ Nbottom

float Nbottom[] = { 0.0, 0.0, -1.0 }

Definition at line 37 of file gsd_fringe.c.

◆ Neast

float Neast[] = { 0.8, 0.0, 0.6 }

Definition at line 34 of file gsd_fringe.c.

◆ Nnorth

float Nnorth[] = { 0.0, 0.8, 0.6 }

Normals.

Definition at line 32 of file gsd_fringe.c.

Referenced by gsd_display_fringe().

◆ Nsouth

float Nsouth[] = { 0.0, -0.8, 0.6 }

Definition at line 33 of file gsd_fringe.c.

◆ Ntop

float Ntop[] = { 0.0, 0.0, 1.0 }

Definition at line 36 of file gsd_fringe.c.

Referenced by gsd_north_arrow(), gsd_scalebar(), and gsd_scalebar_v2().

◆ Nwest

float Nwest[] = { -0.8, 0.0, 0.6 }

Definition at line 35 of file gsd_fringe.c.