Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
geom.c File Reference
#include "config.h"
#include <assert.h>
#include <common/geom.h>
#include <common/geomprocs.h>
#include <math.h>
#include <stdbool.h>
#include <util/unreachable.h>
Include dependency graph for geom.c:

Go to the source code of this file.

Macros

#define SMALL   0.0000000001
 
#define dot(v, w)   (v.x*w.x+v.y*w.y)
 

Functions

int lineToBox (pointf p, pointf q, boxf b)
 
void rect2poly (pointf *p)
 
pointf cwrotatepf (pointf p, int cwrot)
 
pointf ccwrotatepf (pointf p, int ccwrot)
 
boxf flip_rec_boxf (boxf b, pointf p)
 
double ptToLine2 (pointf a, pointf b, pointf p)
 
int line_intersect (pointf a, pointf b, pointf c, pointf d, pointf *p)
 

Detailed Description

API geomprocs.h

Definition in file geom.c.

Macro Definition Documentation

◆ dot

#define dot (   v,
 
)    (v.x*w.x+v.y*w.y)

Definition at line 228 of file geom.c.

◆ SMALL

#define SMALL   0.0000000001

Definition at line 213 of file geom.c.

Function Documentation

◆ ccwrotatepf()

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()

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:

◆ flip_rec_boxf()

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:

◆ line_intersect()

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()

int lineToBox ( pointf  p,
pointf  q,
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:

◆ ptToLine2()

double ptToLine2 ( pointf  a,
pointf  b,
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()

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: