Graphviz 13.0.0~dev.20241220.2304
|
#include <neatogen/neato.h>
#include <assert.h>
#include <string.h>
#include <math.h>
#include <neatogen/poly.h>
#include <common/geom.h>
#include <neatogen/mem.h>
#include <stdbool.h>
#include <util/alloc.h>
#include <util/streq.h>
Go to the source code of this file.
Macros | |
#define | PUTPT(P, X, Y) ((P).x=(X),(P).y=(Y)) |
#define | Pin 1 |
#define | Qin 2 |
#define | Unknown 0 |
#define | advance(A, B, N) (B++, A = (A+1)%N) |
Functions | |
static bool | ISBOX (const Poly *p) |
static bool | ISCIRCLE (const Poly *p) |
void | polyFree (void) |
void | breakPoly (Poly *pp) |
static void | bbox (Point *verts, size_t cnt, Point *o, Point *c) |
static void | inflatePts (Point *verts, size_t cnt, double xmargin, double ymargin) |
static int | isBox (Point *verts, size_t cnt) |
static Point | makeScaledTransPoint (double x, double y, double dx, double dy) |
static Point | makeScaledPoint (double x, double y) |
static Point * | genRound (Agnode_t *n, size_t *sidep, double xm, double ym) |
int | makeAddPoly (Poly *pp, Agnode_t *n, double xmargin, double ymargin) |
int | makePoly (Poly *pp, Agnode_t *n, double xmargin, double ymargin) |
static int | pintersect (Point originp, Point cornerp, Point originq, Point cornerq) |
static int | edgesIntersect (Point *P, Point *Q, int n, int m) |
static int | inPoly (Point vertex[], int n, Point q) |
static bool | inBox (Point p, Point origin_point, Point corner) |
static void | transCopy (Point *inp, int cnt, Point off, Point *outp) |
int | polyOverlap (Point p, Poly *pp, Point q, Poly *qp) |
Variables | |
static const int | BOX = 1 |
static const int | CIRCLE = 2 |
static size_t | maxcnt = 0 |
static Point * | tp1 = NULL |
static Point * | tp2 = NULL |
static Point * | tp3 = NULL |
Definition at line 49 of file poly.c.
References cnt(), Point::x, and Point::y.
Referenced by makeAddPoly(), and makePoly().
void breakPoly | ( | Poly * | pp | ) |
Definition at line 44 of file poly.c.
References free(), and Poly::verts.
Referenced by freeNodes().
Definition at line 107 of file poly.c.
References agget(), DFLT_SAMPLE, gv_calloc(), M_PI, ND_height, ND_width, Point::x, and Point::y.
Referenced by makeAddPoly(), and makePoly().
Definition at line 421 of file poly.c.
References Point::x, and Point::y.
Referenced by polyOverlap().
|
static |
Definition at line 364 of file poly.c.
References gv_calloc(), maxcnt, NULL, tp3, Point::x, and Point::y.
Referenced by polyOverlap().
|
static |
Definition at line 25 of file poly.c.
References BOX, and Poly::kind.
Referenced by polyOverlap().
|
static |
Definition at line 79 of file poly.c.
References cnt().
Referenced by makeAddPoly(), and makePoly().
|
static |
Definition at line 26 of file poly.c.
References CIRCLE, and Poly::kind.
Referenced by polyOverlap().
Definition at line 128 of file poly.c.
References agerrorf(), bbox(), BOX, CIRCLE, Poly::corner, genRound(), gv_calloc(), isBox(), Poly::kind, boxf::LL, makeScaledTransPoint(), maxcnt, ND_clust, ND_height, ND_shape, ND_shape_info, ND_width, Poly::nverts, Poly::origin, PS2INCH, PUTPT, SH_POINT, SH_POLY, SH_RECORD, shapeOf(), streq(), boxf::UR, Poly::verts, pointf_s::x, Point::x, pointf_s::y, and Point::y.
Referenced by makeInfo().
Definition at line 218 of file poly.c.
References agerrorf(), bbox(), BOX, CIRCLE, Poly::corner, genRound(), gv_calloc(), inflatePts(), isBox(), Poly::kind, boxf::LL, makeScaledPoint(), maxcnt, ND_clust, ND_height, ND_shape, ND_shape_info, ND_width, Poly::nverts, Poly::origin, PS2INCH, PUTPT, SH_POINT, SH_POLY, SH_RECORD, shapeOf(), streq(), boxf::UR, Poly::verts, pointf_s::x, Point::x, pointf_s::y, and Point::y.
Referenced by makeInfo().
|
static |
|
static |
Definition at line 293 of file poly.c.
References Point::x, and Point::y.
Referenced by polyOverlap().
void polyFree | ( | void | ) |
Definition at line 438 of file poly.c.
References addpt(), Poly::corner, dx, dy, edgesIntersect(), gv_calloc(), inBox(), inPoly(), ISBOX(), ISCIRCLE(), maxcnt, NULL, Poly::nverts, Poly::origin, pintersect(), tp1, tp2, transCopy(), Poly::verts, Point::x, and Point::y.
Referenced by countOverlap().
|
static |
Definition at line 22 of file poly.c.
Referenced by ISBOX(), makeAddPoly(), and makePoly().
|
static |
Definition at line 23 of file poly.c.
Referenced by ISCIRCLE(), makeAddPoly(), and makePoly().
|
static |
Definition at line 28 of file poly.c.
Referenced by inPoly(), makeAddPoly(), makePoly(), polyFree(), and polyOverlap().
Definition at line 29 of file poly.c.
Referenced by polyFree(), and polyOverlap().
Definition at line 30 of file poly.c.
Referenced by polyFree(), and polyOverlap().