File: izoom.h

package info (click to toggle)
glut 3.7-14
  • links: PTS
  • area: main
  • in suites: woody
  • size: 12,556 kB
  • ctags: 45,170
  • sloc: ansic: 148,716; makefile: 35,208; ada: 2,062; yacc: 473; fortran: 290; lex: 131; csh: 51; sed: 49; sh: 33
file content (49 lines) | stat: -rw-r--r-- 1,161 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef IZOOMDEF
#define IZOOMDEF

/**
 **     header for izoom- 
 **             Magnify or minify a picture with or without filtering.  The 
 **     filtered method is one pass, uses 2-d convolution, and is optimized 
 **     by integer arithmetic and precomputation of filter coeffs.
 **
 **                             Paul Haeberli - 1988
 **/

#define IMPULSE		1
#define BOX		2
#define TRIANGLE	3
#define QUADRATIC	4
#define MITCHELL	5
#define GAUSSIAN	6

typedef struct FILTER {
  int n, totw, halftotw;
  short *dat;
  short *w;
} FILTER;

typedef void (*getfunc_t) (short *, int);

typedef struct zoom {
  getfunc_t getfunc;
  short *abuf;
  short *bbuf;
  int anx, any;
  int bnx, bny;
  short **xmap;
  int type;
  int curay;
  int y;
  FILTER *xfilt, *yfilt;  /* stuff for fitered zoom */
  short *tbuf;
  int nrows, clamp, ay;
  short **filtrows;
  int *accrow;
} zoom;

zoom *newzoom(getfunc_t getfunc, int anx, int any, int bnx, int bny, int filttype, float blur);
float filterinteg(float bmin, float bmax, float blurf);
void filterzoom(getfunc_t getfunc, getfunc_t putfunc, int anx, int any, int bnx, int bny, int filttype, float blur);

#endif