File: bump.h

package info (click to toggle)
libace-perl 1.92-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,012 kB
  • sloc: perl: 7,763; ansic: 7,420; makefile: 81
file content (52 lines) | stat: -rw-r--r-- 1,902 bytes parent folder | download | duplicates (7)
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
50
51
52
/*  File: bump.h
 *  Author: Jean Thierry-Mieg (mieg@mrc-lmb.cam.ac.uk)
 *  Copyright (C) J Thierry-Mieg and R Durbin, 1992
 *-------------------------------------------------------------------
 * This file is part of the ACEDB genome database package, written by
 * 	Richard Durbin (MRC LMB, UK) rd@mrc-lmb.cam.ac.uk, and
 *	Jean Thierry-Mieg (CRBM du CNRS, France) mieg@kaa.cnrs-mop.fr
 *
 * Description:
 * Exported functions:
 * HISTORY:
 * Last edited: Dec 17 16:05 1998 (fw)
 * Created: Thu Aug 20 10:42:03 1992 (mieg)
 *-------------------------------------------------------------------
 */

/* $Id: bump.h,v 1.1 2002/11/14 20:00:06 lstein Exp $ */

#ifndef DEF_BUMP_H
#define DEF_BUMP_H

/* forward declaration of opaque type */
typedef struct BumpStruct *BUMP;

BUMP bumpCreate (int ncol, int minSpace) ;
BUMP bumpReCreate (BUMP bump, int ncol, int minSpace) ;
void bumpDestroy (BUMP bump) ;
float bumpSetSloppy( BUMP bump, float sloppy) ;

/* Bumper works by resetting x,y
   bumpItem inserts and fills the bumper
   bumpTest restes x,y, but does not fill bumper
     this allows to reconsider the wisdom of bumping
   bumpRegister (called after bumpTest) fills 
     Test+Register == Add 
   bumpText returns number of letters that
     can be bumped without *py moving more than 3*dy  
*/

#define bumpItem(_b,_w,_h,_px,_py) bumpAdd(_b,_w,_h,_px,_py,TRUE)
#define bumpTest(_b,_w,_h,_px,_py) bumpAdd(_b,_w,_h,_px,_py,FALSE)
			
BOOL bumpAdd (BUMP bump, int wid, float height, int *px, float *py, BOOL doIt);
void bumpRegister (BUMP bump, int wid, float height, int *px, float *py) ;
int bumpText (BUMP bump, char *text, int *px, float *py, float dy, BOOL vertical) ;
int bumpMax(BUMP bump) ;
void asciiBumpItem (BUMP bump, int wid, float height, 
                                 int *px, float *py) ;
                                /* works by resetting x, y */


#endif /* DEF_BUMP_H */