Graphviz 13.0.0~dev.20250121.0651
Loading...
Searching...
No Matches
geomprocs.h File Reference

geometric functions (e.g. on points and boxes) More...

#include <math.h>
#include <stdbool.h>
#include "geom.h"
Include dependency graph for geomprocs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GEOMPROCS_API   /* nothing */
 
#define EXPANDBB(b0, b1)    (_Generic((b0), box *: expandbb, boxf *: expandbbf)((b0), (b1)))
 

Functions

static void expandbp (boxf *b, pointf p)
 expand box b as needed to enclose point p
 
static void expandbb (box *b0, box b1)
 expand box b0 as needed to enclose box b1
 
static void expandbbf (boxf *b0, boxf b1)
 
GEOMPROCS_API boxf flip_rec_boxf (boxf b, pointf p)
 
GEOMPROCS_API double ptToLine2 (pointf l1, pointf l2, pointf p)
 
GEOMPROCS_API int lineToBox (pointf p1, pointf p2, boxf b)
 
GEOMPROCS_API pointf ccwrotatepf (pointf p, int ccwrot)
 
GEOMPROCS_API pointf cwrotatepf (pointf p, int cwrot)
 
GEOMPROCS_API void rect2poly (pointf *p)
 
GEOMPROCS_API int line_intersect (pointf a, pointf b, pointf c, pointf d, pointf *p)
 
static point add_point (point p, point q)
 
static pointf add_pointf (pointf p, pointf q)
 
static pointf sub_pointf (pointf p, pointf q)
 
static pointf mid_pointf (pointf p, pointf q)
 
static pointf interpolate_pointf (double t, pointf p, pointf q)
 
static point exch_xy (point p)
 
static pointf exch_xyf (pointf p)
 
static bool boxf_overlap (boxf b0, boxf b1)
 
static pointf perp (pointf p)
 
static pointf scale (double c, pointf p)
 

Detailed Description

with application to, but no specific dependence on graphs

Definition in file geomprocs.h.

Macro Definition Documentation

◆ EXPANDBB

#define EXPANDBB (   b0,
  b1 
)     (_Generic((b0), box *: expandbb, boxf *: expandbbf)((b0), (b1)))

Definition at line 64 of file geomprocs.h.

◆ GEOMPROCS_API

#define GEOMPROCS_API   /* nothing */

Definition at line 40 of file geomprocs.h.

Function Documentation

◆ add_point()

static point add_point ( point  p,
point  q 
)
inlinestatic

Definition at line 79 of file geomprocs.h.

References point::x, and point::y.

◆ add_pointf()

static pointf add_pointf ( pointf  p,
pointf  q 
)
inlinestatic

Definition at line 88 of file geomprocs.h.

References pointf_s::x, and pointf_s::y.

Referenced by addEndpoint(), arrow_type_crow0(), arrow_type_diamond0(), beginpath(), compute_bb(), endpath(), gen_fields(), genPoly(), getPath(), make_flat_labeled_edge(), makeLineEdge(), makeSimpleFlat(), makeSimpleFlatLabels(), makeStraightEdges(), Mcircle_hack(), overlap_label(), packRects(), record_inside(), spline_edges_(), and transformf().

Here is the caller graph for this function:

◆ boxf_overlap()

static bool boxf_overlap ( boxf  b0,
boxf  b1 
)
inlinestatic

Definition at line 142 of file geomprocs.h.

References OVERLAP.

Referenced by edge_in_box(), emit_xdot(), node_in_box(), and overlap_edge().

Here is the caller graph for this function:

◆ ccwrotatepf()

GEOMPROCS_API pointf ccwrotatepf ( pointf  p,
int  ccwrot 
)

Definition at line 172 of file geom.c.

References UNREACHABLE, pointf_s::x, and pointf_s::y.

Referenced by compassPoint(), epsf_inside(), map_point(), point_inside(), poly_inside(), record_inside(), and star_inside().

Here is the caller graph for this function:

◆ cwrotatepf()

GEOMPROCS_API pointf cwrotatepf ( pointf  p,
int  cwrot 
)

Definition at line 147 of file geom.c.

References UNREACHABLE, pointf_s::x, and pointf_s::y.

Referenced by compassPoint(), and compassPort().

Here is the caller graph for this function:

◆ exch_xy()

static point exch_xy ( point  p)
inlinestatic

Definition at line 124 of file geomprocs.h.

References point::x, and point::y.

Referenced by init_job_pagination(), and setup_page().

Here is the caller graph for this function:

◆ exch_xyf()

static pointf exch_xyf ( pointf  p)
inlinestatic

Definition at line 133 of file geomprocs.h.

References pointf_s::x, and pointf_s::y.

Referenced by _neato_set_aspect(), init_job_pagination(), and set_aspect().

Here is the caller graph for this function:

◆ expandbb()

static void expandbb ( box b0,
box  b1 
)
inlinestatic

Definition at line 52 of file geomprocs.h.

References box::LL, MAX, MIN, box::UR, point::x, and point::y.

◆ expandbbf()

static void expandbbf ( boxf b0,
boxf  b1 
)
inlinestatic

Definition at line 58 of file geomprocs.h.

References boxf::LL, boxf::UR, pointf_s::x, and pointf_s::y.

◆ expandbp()

static void expandbp ( boxf b,
pointf  p 
)
inlinestatic

Definition at line 44 of file geomprocs.h.

References boxf::LL, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by bezier_bb(), compute_bb(), and gvrender_usershape().

Here is the caller graph for this function:

◆ flip_rec_boxf()

GEOMPROCS_API boxf flip_rec_boxf ( boxf  b,
pointf  p 
)

Definition at line 197 of file geom.c.

References boxf::LL, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by record_path().

Here is the caller graph for this function:

◆ interpolate_pointf()

static pointf interpolate_pointf ( double  t,
pointf  p,
pointf  q 
)
inlinestatic

Definition at line 115 of file geomprocs.h.

References pointf_s::x, and pointf_s::y.

Referenced by alloc_interpolation_points().

Here is the caller graph for this function:

◆ line_intersect()

GEOMPROCS_API int line_intersect ( pointf  a,
pointf  b,
pointf  c,
pointf  d,
pointf p 
)

Definition at line 235 of file geom.c.

References dot, perp(), scale(), SMALL, and sub_pointf().

Referenced by raySegIntersect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lineToBox()

GEOMPROCS_API int lineToBox ( pointf  p1,
pointf  p2,
boxf  b 
)

Definition at line 47 of file geom.c.

References BETWEEN, INSIDE, boxf::LL, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by overlap_bezier().

Here is the caller graph for this function:

◆ mid_pointf()

static pointf mid_pointf ( pointf  p,
pointf  q 
)
inlinestatic

Definition at line 106 of file geomprocs.h.

References pointf_s::x, and pointf_s::y.

Referenced by bend(), gen_fields(), gvrender_ellipse(), layout(), makeCompoundEdge(), overlap_node(), and wedgedEllipse().

Here is the caller graph for this function:

◆ perp()

static pointf perp ( pointf  p)
inlinestatic

Definition at line 146 of file geomprocs.h.

References pointf_s::x, and pointf_s::y.

Referenced by line_intersect(), and makeStraightEdges().

Here is the caller graph for this function:

◆ ptToLine2()

GEOMPROCS_API double ptToLine2 ( pointf  l1,
pointf  l2,
pointf  p 
)

Definition at line 218 of file geom.c.

References dx, dy, SMALL, pointf_s::x, and pointf_s::y.

Referenced by check_control_points().

Here is the caller graph for this function:

◆ rect2poly()

GEOMPROCS_API void rect2poly ( pointf p)

Definition at line 139 of file geom.c.

References pointf_s::x, and pointf_s::y.

Referenced by emit_map_rect(), emit_page(), map_label(), and map_point().

Here is the caller graph for this function:

◆ scale()

static pointf scale ( double  c,
pointf  p 
)
inlinestatic

Definition at line 155 of file geomprocs.h.

References pointf_s::x, and pointf_s::y.

Referenced by _neato_set_aspect(), arrow_type_diamond0(), cairogen_begin_page(), computeScaleXY(), D2E(), emit_html_img(), gdgen_begin_page(), gvrender_ptf(), gvrender_ptf_A(), line_intersect(), overlap_arrow(), scale_clamp(), and set_aspect().

Here is the caller graph for this function:

◆ sub_pointf()

static pointf sub_pointf ( pointf  p,
pointf  q 
)
inlinestatic

Definition at line 97 of file geomprocs.h.

References pointf_s::x, and pointf_s::y.

Referenced by arrow_type_crow0(), arrow_type_diamond0(), arrow_type_normal0(), arrow_type_tee(), compute_bb(), genPoly(), idealsize(), layout(), line_intersect(), overlap_label(), overlap_node(), record_inside(), set_aspect(), and wedgedEllipse().

Here is the caller graph for this function: