GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-d6dec75dd4
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.

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_FORE, FRINGE_WIDTH, gsd_color_func(), gsd_colormode(), gsd_fringe_horiz_line(), gsd_fringe_horiz_poly(), gsd_fringe_vert_line(), gsd_fringe_vert_poly(), gsd_linewidth(), gsd_zwritemask(), Neast, Nnorth, Nsouth, Nwest, VCOLS, VROWS, 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 227 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.

Referenced by gsd_display_fringe().

◆ 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.

Referenced by gsd_display_fringe().

◆ 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 407 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.

Referenced by gsd_display_fringe().

◆ 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 322 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.

Referenced by gsd_display_fringe().

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.

Referenced by gsd_display_fringe().

◆ 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.

Referenced by gsd_display_fringe().

◆ 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.

Referenced by gsd_display_fringe().