From: ellson Date: Thu, 27 Dec 2007 20:13:13 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: LAST_LIBGRAPH~32^2~4948 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f6c42044bbc1ef1275f3f4b944dca9a0243a176;p=graphviz *** empty log message *** --- diff --git a/lib/common/geom.h b/lib/common/geom.h index 1b6b7d273..7ebbce365 100644 --- a/lib/common/geom.h +++ b/lib/common/geom.h @@ -58,6 +58,10 @@ typedef struct { pointf LL, UR; } boxf; #define DIST(p1,p2) (sqrt(DIST2((p1),(p2)))) #define POINTS_PER_INCH 72 +#define POINTS_PER_PC ((double)POINTS_PER_INCH / 6) +#define POINTS_PER_CM ((double)POINTS_PER_INCH * 0.393700787) +#define POINTS_PER_MM ((double)POINTS_PER_INCH * 0.0393700787) + #define POINTS(f_inch) (ROUND((f_inch)*POINTS_PER_INCH)) #define PS2INCH(ps) ((ps)/(double)POINTS_PER_INCH) @@ -65,6 +69,7 @@ typedef struct { pointf LL, UR; } boxf; #define PF2P(pf, p) (p.x = ROUND (pf.x), p.y = ROUND (pf.y)) #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) #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)) + #endif #ifdef __cplusplus