Graphviz  2.41.20171026.1811
Data Structures | Macros | Typedefs
geom.h File Reference
#include "arith.h"
Include dependency graph for geom.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  point
 
struct  pointf_s
 
struct  box
 
struct  boxf
 

Macros

#define HAVE_POINTF_S
 
#define INSIDE(p, b)   (BETWEEN((b).LL.x,(p).x,(b).UR.x) && BETWEEN((b).LL.y,(p).y,(b).UR.y))
 
#define OVERLAP(b0, b1)   (((b0).UR.x >= (b1).LL.x) && ((b1).UR.x >= (b0).LL.x) && ((b0).UR.y >= (b1).LL.y) && ((b1).UR.y >= (b0).LL.y))
 
#define CONTAINS(b0, b1)   (((b0).UR.x >= (b1).UR.x) && ((b0).UR.y >= (b1).UR.y) && ((b0).LL.x <= (b1).LL.x) && ((b0).LL.y <= (b1).LL.y))
 
#define EXPANDBP(b, p)   ((b).LL.x = MIN((b).LL.x, (p).x), (b).LL.y = MIN((b).LL.y, (p).y), (b).UR.x = MAX((b).UR.x, (p).x), (b).UR.y = MAX((b).UR.y, (p).y))
 
#define EXPANDBB(b0, b1)   ((b0).LL.x = MIN((b0).LL.x, (b1).LL.x), (b0).LL.y = MIN((b0).LL.y, (b1).LL.y), (b0).UR.x = MAX((b0).UR.x, (b1).UR.x), (b0).UR.y = MAX((b0).UR.y, (b1).UR.y))
 
#define CLIPBB(b0, b1)   ((b0).LL.x = MAX((b0).LL.x, (b1).LL.x), (b0).LL.y = MAX((b0).LL.y, (b1).LL.y), (b0).UR.x = MIN((b0).UR.x, (b1).UR.x), (b0).UR.y = MIN((b0).UR.y, (b1).UR.y))
 
#define LEN2(a, b)   (SQR(a) + SQR(b))
 
#define LEN(a, b)   (sqrt(LEN2((a),(b))))
 
#define DIST2(p, q)   (LEN2(((p).x - (q).x),((p).y - (q).y)))
 
#define DIST(p, q)   (sqrt(DIST2((p),(q))))
 
#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(a_inches)   (ROUND((a_inches)*POINTS_PER_INCH))
 
#define INCH2PS(a_inches)   ((a_inches)*(double)POINTS_PER_INCH)
 
#define PS2INCH(a_points)   ((a_points)/(double)POINTS_PER_INCH)
 
#define P2PF(p, pf)   ((pf).x = (p).x,(pf).y = (p).y)
 
#define PF2P(pf, p)   ((p).x = ROUND((pf).x),(p).y = ROUND((pf).y))
 
#define B2BF(b, bf)   (P2PF((b).LL,(bf).LL),P2PF((b).UR,(bf).UR))
 
#define BF2B(bf, b)   (PF2P((bf).LL,(b).LL),PF2P((bf).UR,(b).UR))
 
#define APPROXEQ(a, b, tol)   (ABS((a) - (b)) < (tol))
 
#define APPROXEQPT(p, q, tol)   (DIST2((p),(q)) < SQR(tol))
 
#define MILLIPOINT   .001
 
#define MICROPOINT   .000001
 

Typedefs

typedef struct pointf_s pointf
 

Macro Definition Documentation

#define APPROXEQ (   a,
  b,
  tol 
)    (ABS((a) - (b)) < (tol))

Definition at line 77 of file geom.h.

#define APPROXEQPT (   p,
  q,
  tol 
)    (DIST2((p),(q)) < SQR(tol))

Definition at line 78 of file geom.h.

Referenced by addEdgeLabels(), clip_and_install(), edgeMidpoint(), and makeStraightEdges().

#define B2BF (   b,
  bf 
)    (P2PF((b).LL,(bf).LL),P2PF((b).UR,(bf).UR))

Definition at line 74 of file geom.h.

Referenced by compute_bb().

#define BF2B (   bf,
 
)    (PF2P((bf).LL,(b).LL),PF2P((bf).UR,(b).UR))

Definition at line 75 of file geom.h.

#define CLIPBB (   b0,
  b1 
)    ((b0).LL.x = MAX((b0).LL.x, (b1).LL.x), (b0).LL.y = MAX((b0).LL.y, (b1).LL.y), (b0).UR.x = MIN((b0).UR.x, (b1).UR.x), (b0).UR.y = MIN((b0).UR.y, (b1).UR.y))

Definition at line 54 of file geom.h.

#define CONTAINS (   b0,
  b1 
)    (((b0).UR.x >= (b1).UR.x) && ((b0).UR.y >= (b1).UR.y) && ((b0).LL.x <= (b1).LL.x) && ((b0).LL.y <= (b1).LL.y))

Definition at line 45 of file geom.h.

#define DIST (   p,
 
)    (sqrt(DIST2((p),(q))))

Definition at line 60 of file geom.h.

Referenced by arrowOrthoClip().

#define DIST2 (   p,
 
)    (LEN2(((p).x - (q).x),((p).y - (q).y)))

Definition at line 59 of file geom.h.

Referenced by arrowEndClip(), arrowStartClip(), box_connection(), and dotneato_closest().

#define EXPANDBB (   b0,
  b1 
)    ((b0).LL.x = MIN((b0).LL.x, (b1).LL.x), (b0).LL.y = MIN((b0).LL.y, (b1).LL.y), (b0).UR.x = MAX((b0).UR.x, (b1).UR.x), (b0).UR.y = MAX((b0).UR.y, (b1).UR.y))

Definition at line 51 of file geom.h.

Referenced by compute_bb(), and packSubgraphs().

#define EXPANDBP (   b,
 
)    ((b).LL.x = MIN((b).LL.x, (p).x), (b).LL.y = MIN((b).LL.y, (p).y), (b).UR.x = MAX((b).UR.x, (p).x), (b).UR.y = MAX((b).UR.y, (p).y))

Definition at line 48 of file geom.h.

Referenced by compute_bb(), and gvrender_usershape().

#define HAVE_POINTF_S

Definition at line 31 of file geom.h.

#define INCH2PS (   a_inches)    ((a_inches)*(double)POINTS_PER_INCH)

Definition at line 68 of file geom.h.

Referenced by gv_nodesize().

#define INSIDE (   p,
 
)    (BETWEEN((b).LL.x,(p).x,(b).UR.x) && BETWEEN((b).LL.y,(p).y,(b).UR.y))

Definition at line 39 of file geom.h.

Referenced by html_path().

#define LEN (   a,
 
)    (sqrt(LEN2((a),(b))))

Definition at line 57 of file geom.h.

Referenced by makeAddPoly(), makeObstacle(), and makeStraightEdges().

#define LEN2 (   a,
 
)    (SQR(a) + SQR(b))

Definition at line 56 of file geom.h.

#define MICROPOINT   .000001

Definition at line 82 of file geom.h.

#define MILLIPOINT   .001

Definition at line 81 of file geom.h.

Referenced by addEdgeLabels(), clip_and_install(), edgeMidpoint(), and makeStraightEdges().

#define OVERLAP (   b0,
  b1 
)    (((b0).UR.x >= (b1).LL.x) && ((b1).UR.x >= (b0).LL.x) && ((b0).UR.y >= (b1).LL.y) && ((b1).UR.y >= (b0).LL.y))

Definition at line 42 of file geom.h.

Referenced by overlap_label(), and overlap_node().

#define P2PF (   p,
  pf 
)    ((pf).x = (p).x,(pf).y = (p).y)

Definition at line 71 of file geom.h.

#define PF2P (   pf,
 
)    ((p).x = ROUND((pf).x),(p).y = ROUND((pf).y))

Definition at line 72 of file geom.h.

Referenced by gdgen_text().

#define POINTS (   a_inches)    (ROUND((a_inches)*POINTS_PER_INCH))
#define POINTS_PER_CM   ((double)POINTS_PER_INCH * 0.393700787)

Definition at line 64 of file geom.h.

#define POINTS_PER_INCH   72
#define POINTS_PER_MM   ((double)POINTS_PER_INCH * 0.0393700787)

Definition at line 65 of file geom.h.

#define POINTS_PER_PC   ((double)POINTS_PER_INCH / 6)

Definition at line 63 of file geom.h.

#define PS2INCH (   a_points)    ((a_points)/(double)POINTS_PER_INCH)

Typedef Documentation

typedef struct pointf_s pointf