~ubuntu-branches/ubuntu/lucid/graphviz/lucid

« back to all changes in this revision

Viewing changes to lib/common/geom.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2008-06-19 20:23:23 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080619202323-ls23h96ntj9ny94m
Tags: 2.18-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Build depend on liblualib50-dev instead of liblua5.1-0-dev.
  - Drop libttf-dev (libttf-dev is in universe) (LP: #174749).
  - Replace gs-common with ghostscript.
  - Build-depend on python-dev instead of python2.4-dev or python2.5-dev.
  - Mention the correct python version for the python bindings in the
    package description.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: geom.h,v 1.9 2006/12/07 22:49:35 erg Exp $ $Revision: 1.9 $ */
 
1
/* $Id: geom.h,v 1.10 2007/12/27 20:13:13 ellson Exp $ $Revision: 1.10 $ */
2
2
/* vim:set shiftwidth=4 ts=8: */
3
3
 
4
4
/**********************************************************
58
58
#define DIST(p1,p2) (sqrt(DIST2((p1),(p2))))
59
59
 
60
60
#define POINTS_PER_INCH 72
 
61
#define POINTS_PER_PC ((double)POINTS_PER_INCH / 6)
 
62
#define POINTS_PER_CM ((double)POINTS_PER_INCH * 0.393700787)
 
63
#define POINTS_PER_MM ((double)POINTS_PER_INCH * 0.0393700787)
 
64
 
61
65
#define POINTS(f_inch)  (ROUND((f_inch)*POINTS_PER_INCH))
62
66
#define PS2INCH(ps)             ((ps)/(double)POINTS_PER_INCH)
63
67
 
65
69
#define PF2P(pf, p) (p.x = ROUND (pf.x), p.y = ROUND (pf.y))
66
70
#define B2BF(b, bf) (bf.LL.x = b.LL.x, bf.LL.y = b.LL.y, bf.UR.x = b.UR.x, bf.UR.y = b.UR.y)
67
71
#define BF2B(bf, b) (b.LL.x = ROUND (bf.LL.x), b.LL.y = ROUND (bf.LL.y), b.UR.x = ROUND (bf.UR.x), b.UR.y = ROUND (bf.UR.y))
 
72
 
68
73
#endif
69
74
 
70
75
#ifdef __cplusplus