Defines | Functions | Variables

plshade.c File Reference

#include "plplotP.h"
#include <float.h>

Go to the source code of this file.

Defines

#define MISSING_MIN_DEF   (PLFLT) 1.0
#define MISSING_MAX_DEF   (PLFLT) -1.0
#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 (void(*fill)(PLINT, const PLFLT *, const PLFLT *), PLINT(*defined)(PLFLT, PLFLT), const PLFLT *x, const PLFLT *y, PLINT v1, PLINT v2, PLINT v3, PLINT v4)
static void exfill (void(*fill)(PLINT, const PLFLT *, const PLFLT *), PLINT(*defined)(PLFLT, PLFLT), int n, const PLFLT *x, const PLFLT *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 (PLFLT(*f2eval)(PLINT, PLINT, PLPointer), PLPointer f2eval_data, PLFLT(*c2eval)(PLINT, PLINT, PLPointer), PLPointer c2eval_data, PLINT(*defined)(PLFLT, PLFLT), PLFLT missing_min, PLFLT missing_max, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void(*fill)(PLINT, const PLFLT *, const PLFLT *), PLINT rectangular, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
void c_plshades (const PLFLT **a, PLINT nx, PLINT ny, PLINT(*defined)(PLFLT, PLFLT), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, const PLFLT *clevel, PLINT nlevel, PLINT fill_width, PLINT cont_color, PLINT cont_width, void(*fill)(PLINT, const PLFLT *, const PLFLT *), PLINT rectangular, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
void plfshades (PLF2OPS zops, PLPointer zp, PLINT nx, PLINT ny, PLINT(*defined)(PLFLT, PLFLT), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, const PLFLT *clevel, PLINT nlevel, PLINT fill_width, PLINT cont_color, PLINT cont_width, void(*fill)(PLINT, const PLFLT *, const PLFLT *), PLINT rectangular, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
void c_plshade (const PLFLT **a, PLINT nx, PLINT ny, PLINT(*defined)(PLFLT, PLFLT), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void(*fill)(PLINT, const PLFLT *, const PLFLT *), PLINT rectangular, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
void c_plshade1 (const PLFLT *a, PLINT nx, PLINT ny, PLINT(*defined)(PLFLT, PLFLT), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void(*fill)(PLINT, const PLFLT *, const PLFLT *), PLINT rectangular, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
void plfshade (PLFLT(*f2eval)(PLINT, PLINT, PLPointer), PLPointer f2eval_data, PLFLT(*c2eval)(PLINT, PLINT, PLPointer), 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, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void(*fill)(PLINT, const PLFLT *, const PLFLT *), PLINT rectangular, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
void plfshade1 (PLF2OPS zops, PLPointer zp, PLINT nx, PLINT ny, PLINT(*defined)(PLFLT, PLFLT), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, PLINT min_color, PLINT min_width, PLINT max_color, PLINT max_width, void(*fill)(PLINT, const PLFLT *, const PLFLT *), PLINT rectangular, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
static void bisect (PLINT(*defined)(PLFLT, PLFLT), PLINT niter, PLFLT x1, PLFLT y1, PLFLT x2, PLFLT y2, PLFLT *xb, PLFLT *yb)

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 PLINT pen_wd_min
static PLINT pen_wd_max
static PLFLT int_val

Define Documentation

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

Definition at line 1085 of file plshade.c.

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

Definition at line 137 of file plshade.c.

#define MISSING_MAX_DEF   (PLFLT) -1.0

Definition at line 128 of file plshade.c.

#define MISSING_MIN_DEF   (PLFLT) 1.0

Definition at line 127 of file plshade.c.

#define NEG   1

Definition at line 131 of file plshade.c.

#define NEGATIVE_SLOPE   (PLINT) 0

Definition at line 1250 of file plshade.c.

#define NUMBER_BISECTIONS   10

Definition at line 135 of file plshade.c.

#define OK   0

Definition at line 133 of file plshade.c.

#define POS   8

Definition at line 132 of file plshade.c.

#define POSITIVE_SLOPE   (PLINT) 1

Definition at line 1249 of file plshade.c.

#define RATIO   3

Definition at line 1084 of file plshade.c.

#define RATIO_SQ   6.0

Definition at line 1251 of file plshade.c.

#define UNDEF   64

Definition at line 134 of file plshade.c.

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

Definition at line 1248 of file plshade.c.


Function Documentation

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

Definition at line 1088 of file plshade.c.

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

Definition at line 947 of file plshade.c.

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

Definition at line 326 of file plshade.c.

void c_plshade1 ( const PLFLT a,
PLINT  nx,
PLINT  ny,
PLINT(*)(PLFLT, PLFLT defined,
PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
PLFLT  shade_min,
PLFLT  shade_max,
PLINT  sh_cmap,
PLFLT  sh_color,
PLINT  sh_width,
PLINT  min_color,
PLINT  min_width,
PLINT  max_color,
PLINT  max_width,
void(*)(PLINT, const PLFLT *, const PLFLT *)  fill,
PLINT  rectangular,
void(*)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer pltr,
PLPointer  pltr_data 
)

Definition at line 354 of file plshade.c.

void c_plshades ( const PLFLT **  a,
PLINT  nx,
PLINT  ny,
PLINT(*)(PLFLT, PLFLT defined,
PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
const PLFLT clevel,
PLINT  nlevel,
PLINT  fill_width,
PLINT  cont_color,
PLINT  cont_width,
void(*)(PLINT, const PLFLT *, const PLFLT *)  fill,
PLINT  rectangular,
void(*)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer pltr,
PLPointer  pltr_data 
)

Definition at line 210 of file plshade.c.

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

Definition at line 1173 of file plshade.c.

static void exfill ( void(*)(PLINT, const PLFLT *, const PLFLT *)  fill,
PLINT(*)(PLFLT, PLFLT defined,
int  n,
const PLFLT x,
const PLFLT y 
) [static]

Definition at line 984 of file plshade.c.

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

Definition at line 856 of file plshade.c.

static PLINT plctest ( PLFLT x,
PLFLT  level 
) [static]

Definition at line 1254 of file plshade.c.

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

Definition at line 1314 of file plshade.c.

void plfshade ( PLFLT(*)(PLINT, PLINT, PLPointer f2eval,
PLPointer  f2eval_data,
PLFLT(*)(PLINT, PLINT, PLPointer 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,
PLINT  sh_width,
PLINT  min_color,
PLINT  min_width,
PLINT  max_color,
PLINT  max_width,
void(*)(PLINT, const PLFLT *, const PLFLT *)  fill,
PLINT  rectangular,
void(*)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer pltr,
PLPointer  pltr_data 
)

Definition at line 388 of file plshade.c.

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

Definition at line 422 of file plshade.c.

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

Definition at line 240 of file plshade.c.

static void plshade_int ( PLFLT(*)(PLINT, PLINT, PLPointer f2eval,
PLPointer  f2eval_data,
PLFLT(*)(PLINT, PLINT, PLPointer c2eval,
PLPointer  c2eval_data,
PLINT(*)(PLFLT, PLFLT defined,
PLFLT  missing_min,
PLFLT  missing_max,
PLINT  nx,
PLINT  ny,
PLFLT  xmin,
PLFLT  xmax,
PLFLT  ymin,
PLFLT  ymax,
PLFLT  shade_min,
PLFLT  shade_max,
PLINT  sh_cmap,
PLFLT  sh_color,
PLINT  sh_width,
PLINT  min_color,
PLINT  min_width,
PLINT  max_color,
PLINT  max_width,
void(*)(PLINT, const PLFLT *, const PLFLT *)  fill,
PLINT  rectangular,
void(*)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer pltr,
PLPointer  pltr_data 
) [static]

Definition at line 483 of file plshade.c.

static void selected_polygon ( void(*)(PLINT, const PLFLT *, const PLFLT *)  fill,
PLINT(*)(PLFLT, PLFLT defined,
const PLFLT x,
const PLFLT y,
PLINT  v1,
PLINT  v2,
PLINT  v3,
PLINT  v4 
) [static]

Definition at line 906 of file plshade.c.

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

Definition at line 830 of file plshade.c.


Variable Documentation

PLFLT int_val [static]

Definition at line 146 of file plshade.c.

int max_points [static]

Definition at line 142 of file plshade.c.

int max_pts[4] [static]

Definition at line 143 of file plshade.c.

int min_points [static]

Definition at line 142 of file plshade.c.

int min_pts[4] [static]

Definition at line 143 of file plshade.c.

int n_point [static]

Definition at line 142 of file plshade.c.

PLINT pen_col_max [static]

Definition at line 144 of file plshade.c.

PLINT pen_col_min [static]

Definition at line 144 of file plshade.c.

PLINT pen_wd_max [static]

Definition at line 145 of file plshade.c.

PLINT pen_wd_min [static]

Definition at line 145 of file plshade.c.

PLFLT sh_max [static]

Definition at line 141 of file plshade.c.

PLFLT sh_min [static]

Definition at line 141 of file plshade.c.