PLplot  5.15.0
plshade.c File Reference
#include "plplotP.h"
#include <float.h>

Go to the source code of this file.

Macros

#define NEG   1
 
#define POS   8
 
#define OK   0
 
#define UNDEF   64
 
#define NUMBER_BISECTIONS   10
 
#define linear(val1, val2, level)   ( ( level - val1 ) / ( val2 - val1 ) )
 
#define RATIO   3
 
#define COND(x, y)   cond_code[x * ny + y]
 
#define X(a, b)   ( x[a * 4 + b] )
 
#define POSITIVE_SLOPE   (PLINT) 1
 
#define NEGATIVE_SLOPE   (PLINT) 0
 
#define RATIO_SQ   6.0
 

Functions

static void set_cond (register int *cond, register PLFLT *a, register PLINT n)
 
static int find_interval (PLFLT a0, PLFLT a1, PLINT c0, PLINT c1, PLFLT *x)
 
static void selected_polygon (PLFILL_callback fill, PLDEFINED_callback defined, PLFLT_VECTOR x, PLFLT_VECTOR y, PLINT v1, PLINT v2, PLINT v3, PLINT v4)
 
static void exfill (PLFILL_callback fill, PLDEFINED_callback defined, int n, PLFLT_VECTOR x, PLFLT_VECTOR y)
 
static void big_recl (int *cond_code, register int ny, int dx, int dy, int *ix, int *iy)
 
static void draw_boundary (PLINT slope, PLFLT *x, PLFLT *y)
 
static PLINT plctest (PLFLT *x, PLFLT level)
 
static PLINT plctestez (PLFLT *a, PLINT nx, PLINT ny, PLINT ix, PLINT iy, PLFLT level)
 
static void plshade_int (PLF2EVAL_callback f2eval, PLPointer f2eval_data, PLF2EVAL_callback c2eval, PLPointer c2eval_data, PLDEFINED_callback defined, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, PLINT min_color, PLFLT min_width, PLINT max_color, PLFLT max_width, PLFILL_callback fill, PLINT rectangular, PLTRANSFORM_callback pltr, PLPointer pltr_data)
 
PLDLLIMPEXP void plshades_null (PLFLT_MATRIX a, PLINT nx, PLINT ny, PLDEFINED_callback defined, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT_VECTOR clevel, PLINT nlevel, PLFLT fill_width, PLINT cont_color, PLFLT cont_width, PLFILL_callback fill, PLINT rectangular)
 
void c_plshades (PLFLT_MATRIX a, PLINT nx, PLINT ny, PLDEFINED_callback defined, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT_VECTOR clevel, PLINT nlevel, PLFLT fill_width, PLINT cont_color, PLFLT cont_width, PLFILL_callback fill, PLINT rectangular, PLTRANSFORM_callback pltr, PLPointer pltr_data)
 
void plfshades (PLF2OPS zops, PLPointer zp, PLINT nx, PLINT ny, PLDEFINED_callback defined, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT_VECTOR clevel, PLINT nlevel, PLFLT fill_width, PLINT cont_color, PLFLT cont_width, PLFILL_callback fill, PLINT rectangular, PLTRANSFORM_callback pltr, PLPointer pltr_data)
 
PLDLLIMPEXP void plshade_null (PLFLT_MATRIX a, PLINT nx, PLINT ny, PLDEFINED_callback defined, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, PLINT min_color, PLFLT min_width, PLINT max_color, PLFLT max_width, PLFILL_callback fill, PLINT rectangular)
 
void c_plshade (PLFLT_MATRIX a, PLINT nx, PLINT ny, PLDEFINED_callback defined, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, PLINT min_color, PLFLT min_width, PLINT max_color, PLFLT max_width, PLFILL_callback fill, PLINT rectangular, PLTRANSFORM_callback pltr, PLPointer pltr_data)
 
void plfshade (PLF2EVAL_callback f2eval, PLPointer f2eval_data, PLF2EVAL_callback c2eval, PLPointer c2eval_data, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, PLINT min_color, PLFLT min_width, PLINT max_color, PLFLT max_width, PLFILL_callback fill, PLINT rectangular, PLTRANSFORM_callback pltr, PLPointer pltr_data)
 
void plfshade1 (PLF2OPS zops, PLPointer zp, PLINT nx, PLINT ny, PLDEFINED_callback defined, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, PLINT min_color, PLFLT min_width, PLINT max_color, PLFLT max_width, PLFILL_callback fill, PLINT rectangular, PLTRANSFORM_callback pltr, PLPointer pltr_data)
 
static void plshade_int (PLF2EVAL_callback f2eval, PLPointer f2eval_data, PLF2EVAL_callback c2eval, PLPointer PL_UNUSED(c2eval_data), PLDEFINED_callback defined, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, PLINT min_color, PLFLT min_width, PLINT max_color, PLFLT max_width, PLFILL_callback fill, PLINT rectangular, PLTRANSFORM_callback pltr, PLPointer pltr_data)
 
static void bisect (PLDEFINED_callback defined, PLINT niter, PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2, PLFLT *xb, PLFLT *yb)
 
static PLINT plctest (PLFLT *x, PLFLT PL_UNUSED(level))
 

Variables

static PLFLT sh_max
 
static PLFLT sh_min
 
static int min_points
 
static int max_points
 
static int n_point
 
static int min_pts [4]
 
static int max_pts [4]
 
static PLINT pen_col_min
 
static PLINT pen_col_max
 
static PLFLT pen_wd_min
 
static PLFLT pen_wd_max
 
static PLFLT int_val
 

Macro Definition Documentation

◆ COND

#define COND (   x,
 
)    cond_code[x * ny + y]

Definition at line 1098 of file plshade.c.

◆ linear

#define linear (   val1,
  val2,
  level 
)    ( ( level - val1 ) / ( val2 - val1 ) )

Definition at line 131 of file plshade.c.

◆ NEG

#define NEG   1

Definition at line 125 of file plshade.c.

◆ NEGATIVE_SLOPE

#define NEGATIVE_SLOPE   (PLINT) 0

Definition at line 1263 of file plshade.c.

◆ NUMBER_BISECTIONS

#define NUMBER_BISECTIONS   10

Definition at line 129 of file plshade.c.

◆ OK

#define OK   0

Definition at line 127 of file plshade.c.

◆ POS

#define POS   8

Definition at line 126 of file plshade.c.

◆ POSITIVE_SLOPE

#define POSITIVE_SLOPE   (PLINT) 1

Definition at line 1262 of file plshade.c.

◆ RATIO

#define RATIO   3

Definition at line 1097 of file plshade.c.

◆ RATIO_SQ

#define RATIO_SQ   6.0

Definition at line 1264 of file plshade.c.

◆ UNDEF

#define UNDEF   64

Definition at line 128 of file plshade.c.

◆ X

#define X (   a,
 
)    ( x[a * 4 + b] )

Definition at line 1261 of file plshade.c.

Function Documentation

◆ big_recl()

static void big_recl ( int *  cond_code,
register int  ny,
int  dx,
int  dy,
int *  ix,
int *  iy 
)
static

Definition at line 1101 of file plshade.c.

◆ bisect()

static void bisect ( PLDEFINED_callback  defined,
PLINT  niter,
PLFLT  x1,
PLFLT  y1,
PLFLT  x2,
PLFLT  y2,
PLFLT xb,
PLFLT yb 
)
static

Definition at line 961 of file plshade.c.

◆ c_plshade()

void c_plshade ( PLFLT_MATRIX  a,
PLINT  nx,
PLINT  ny,
PLDEFINED_callback  defined,
PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
PLFLT  shade_min,
PLFLT  shade_max,
PLINT  sh_cmap,
PLFLT  sh_color,
PLFLT  sh_width,
PLINT  min_color,
PLFLT  min_width,
PLINT  max_color,
PLFLT  max_width,
PLFILL_callback  fill,
PLINT  rectangular,
PLTRANSFORM_callback  pltr,
PLPointer  pltr_data 
)

Definition at line 352 of file plshade.c.

◆ c_plshades()

void c_plshades ( PLFLT_MATRIX  a,
PLINT  nx,
PLINT  ny,
PLDEFINED_callback  defined,
PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
PLFLT_VECTOR  clevel,
PLINT  nlevel,
PLFLT  fill_width,
PLINT  cont_color,
PLFLT  cont_width,
PLFILL_callback  fill,
PLINT  rectangular,
PLTRANSFORM_callback  pltr,
PLPointer  pltr_data 
)

Definition at line 216 of file plshade.c.

◆ draw_boundary()

static void draw_boundary ( PLINT  slope,
PLFLT x,
PLFLT y 
)
static

Definition at line 1186 of file plshade.c.

◆ exfill()

static void exfill ( PLFILL_callback  fill,
PLDEFINED_callback  defined,
int  n,
PLFLT_VECTOR  x,
PLFLT_VECTOR  y 
)
static

Definition at line 998 of file plshade.c.

◆ find_interval()

static int find_interval ( PLFLT  a0,
PLFLT  a1,
PLINT  c0,
PLINT  c1,
PLFLT x 
)
static

Definition at line 871 of file plshade.c.

◆ plctest() [1/2]

static PLINT plctest ( PLFLT x,
PLFLT  level 
)
static

◆ plctest() [2/2]

static PLINT plctest ( PLFLT x,
PLFLT   PL_UNUSEDlevel 
)
static

Definition at line 1267 of file plshade.c.

◆ plctestez()

static PLINT plctestez ( PLFLT a,
PLINT  nx,
PLINT  ny,
PLINT  ix,
PLINT  iy,
PLFLT  level 
)
static

Definition at line 1327 of file plshade.c.

◆ plfshade()

void plfshade ( PLF2EVAL_callback  f2eval,
PLPointer  f2eval_data,
PLF2EVAL_callback  c2eval,
PLPointer  c2eval_data,
PLINT  nx,
PLINT  ny,
PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
PLFLT  shade_min,
PLFLT  shade_max,
PLINT  sh_cmap,
PLFLT  sh_color,
PLFLT  sh_width,
PLINT  min_color,
PLFLT  min_width,
PLINT  max_color,
PLFLT  max_width,
PLFILL_callback  fill,
PLINT  rectangular,
PLTRANSFORM_callback  pltr,
PLPointer  pltr_data 
)

Definition at line 416 of file plshade.c.

◆ plfshade1()

void plfshade1 ( PLF2OPS  zops,
PLPointer  zp,
PLINT  nx,
PLINT  ny,
PLDEFINED_callback  defined,
PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
PLFLT  shade_min,
PLFLT  shade_max,
PLINT  sh_cmap,
PLFLT  sh_color,
PLFLT  sh_width,
PLINT  min_color,
PLFLT  min_width,
PLINT  max_color,
PLFLT  max_width,
PLFILL_callback  fill,
PLINT  rectangular,
PLTRANSFORM_callback  pltr,
PLPointer  pltr_data 
)

Definition at line 447 of file plshade.c.

◆ plfshades()

void plfshades ( PLF2OPS  zops,
PLPointer  zp,
PLINT  nx,
PLINT  ny,
PLDEFINED_callback  defined,
PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
PLFLT_VECTOR  clevel,
PLINT  nlevel,
PLFLT  fill_width,
PLINT  cont_color,
PLFLT  cont_width,
PLFILL_callback  fill,
PLINT  rectangular,
PLTRANSFORM_callback  pltr,
PLPointer  pltr_data 
)

Definition at line 245 of file plshade.c.

◆ plshade_int() [1/2]

static void plshade_int ( PLF2EVAL_callback  f2eval,
PLPointer  f2eval_data,
PLF2EVAL_callback  c2eval,
PLPointer  c2eval_data,
PLDEFINED_callback  defined,
PLINT  nx,
PLINT  ny,
PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
PLFLT  shade_min,
PLFLT  shade_max,
PLINT  sh_cmap,
PLFLT  sh_color,
PLFLT  sh_width,
PLINT  min_color,
PLFLT  min_width,
PLINT  max_color,
PLFLT  max_width,
PLFILL_callback  fill,
PLINT  rectangular,
PLTRANSFORM_callback  pltr,
PLPointer  pltr_data 
)
static

◆ plshade_int() [2/2]

static void plshade_int ( PLF2EVAL_callback  f2eval,
PLPointer  f2eval_data,
PLF2EVAL_callback  c2eval,
PLPointer   PL_UNUSEDc2eval_data,
PLDEFINED_callback  defined,
PLINT  nx,
PLINT  ny,
PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
PLFLT  shade_min,
PLFLT  shade_max,
PLINT  sh_cmap,
PLFLT  sh_color,
PLFLT  sh_width,
PLINT  min_color,
PLFLT  min_width,
PLINT  max_color,
PLFLT  max_width,
PLFILL_callback  fill,
PLINT  rectangular,
PLTRANSFORM_callback  pltr,
PLPointer  pltr_data 
)
static

Definition at line 498 of file plshade.c.

◆ plshade_null()

PLDLLIMPEXP void plshade_null ( PLFLT_MATRIX  a,
PLINT  nx,
PLINT  ny,
PLDEFINED_callback  defined,
PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
PLFLT  shade_min,
PLFLT  shade_max,
PLINT  sh_cmap,
PLFLT  sh_color,
PLFLT  sh_width,
PLINT  min_color,
PLFLT  min_width,
PLINT  max_color,
PLFLT  max_width,
PLFILL_callback  fill,
PLINT  rectangular 
)

Definition at line 326 of file plshade.c.

◆ plshades_null()

PLDLLIMPEXP void plshades_null ( PLFLT_MATRIX  a,
PLINT  nx,
PLINT  ny,
PLDEFINED_callback  defined,
PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
PLFLT_VECTOR  clevel,
PLINT  nlevel,
PLFLT  fill_width,
PLINT  cont_color,
PLFLT  cont_width,
PLFILL_callback  fill,
PLINT  rectangular 
)

Definition at line 189 of file plshade.c.

◆ selected_polygon()

static void selected_polygon ( PLFILL_callback  fill,
PLDEFINED_callback  defined,
PLFLT_VECTOR  x,
PLFLT_VECTOR  y,
PLINT  v1,
PLINT  v2,
PLINT  v3,
PLINT  v4 
)
static

Definition at line 921 of file plshade.c.

◆ set_cond()

static void set_cond ( register int *  cond,
register PLFLT a,
register PLINT  n 
)
static

Definition at line 843 of file plshade.c.

Variable Documentation

◆ int_val

PLFLT int_val
static

Definition at line 140 of file plshade.c.

◆ max_points

int max_points
static

Definition at line 136 of file plshade.c.

◆ max_pts

int max_pts[4]
static

Definition at line 137 of file plshade.c.

◆ min_points

int min_points
static

Definition at line 136 of file plshade.c.

◆ min_pts

int min_pts[4]
static

Definition at line 137 of file plshade.c.

◆ n_point

int n_point
static

Definition at line 136 of file plshade.c.

◆ pen_col_max

PLINT pen_col_max
static

Definition at line 138 of file plshade.c.

◆ pen_col_min

PLINT pen_col_min
static

Definition at line 138 of file plshade.c.

◆ pen_wd_max

PLFLT pen_wd_max
static

Definition at line 139 of file plshade.c.

◆ pen_wd_min

PLFLT pen_wd_min
static

Definition at line 139 of file plshade.c.

◆ sh_max

PLFLT sh_max
static

Definition at line 135 of file plshade.c.

◆ sh_min

PLFLT sh_min
static

Definition at line 135 of file plshade.c.