RENDER_API void arrowOrthoClip(edge_t*, pointf* ps, int, int, bezier*, int sflag, int eflag);
RENDER_API void beginpath(path *, Agedge_t *, int, pathend_t *, bool);
RENDER_API void bezier_clip(inside_t * inside_context,
- boolean(*insidefn) (inside_t * inside_context,
+ bool(*insidefn) (inside_t * inside_context,
pointf p), pointf * sp, bool left_inside);
RENDER_API shape_desc *bind_shape(char *name, node_t *);
RENDER_API void makeStraightEdge(graph_t * g, edge_t * e, int edgetype, splineInfo * info);
static void poly_init(node_t * n);
static void poly_free(node_t * n);
static port poly_port(node_t * n, char *portname, char *);
-static boolean poly_inside(inside_t * inside_context, pointf p);
+static bool poly_inside(inside_t * inside_context, pointf p);
static int poly_path(node_t * n, port * p, int side, boxf rv[], int *kptr);
static void poly_gencode(GVJ_t * job, node_t * n);
static void record_init(node_t * n);
static void record_free(node_t * n);
static port record_port(node_t * n, char *portname, char *);
-static boolean record_inside(inside_t * inside_context, pointf p);
+static bool record_inside(inside_t * inside_context, pointf p);
static int record_path(node_t * n, port * p, int side, boxf rv[],
int *kptr);
static void record_gencode(GVJ_t * job, node_t * n);
static void point_init(node_t * n);
static void point_gencode(GVJ_t * job, node_t * n);
-static boolean point_inside(inside_t * inside_context, pointf p);
+static bool point_inside(inside_t * inside_context, pointf p);
-static boolean epsf_inside(inside_t * inside_context, pointf p);
+static bool epsf_inside(inside_t * inside_context, pointf p);
static void epsf_gencode(GVJ_t * job, node_t * n);
static pointf star_size (pointf);
static void star_vertices (pointf*, pointf*);
-static boolean star_inside(inside_t * inside_context, pointf p);
+static bool star_inside(inside_t * inside_context, pointf p);
static poly_desc_t star_gen = {
star_size,
star_vertices,
* coordinate system, it is reset as P in the unrotated coordinate system. Similarly,
* the ND_rw, ND_lw and ND_ht values are rotated if the graph is flipped.
*/
-static boolean poly_inside(inside_t * inside_context, pointf p)
+static bool poly_inside(inside_t * inside_context, pointf p)
{
static node_t *lastn; /* last node argument */
static polygon_t *poly;
if (!inside_context) {
lastn = NULL;
- return FALSE;
+ return false;
}
bp = inside_context->s.bp;
/* inside bounding box? */
if (fabs(P.x) > box_URx || fabs(P.y) > box_URy)
- return FALSE;
+ return false;
/* ellipses */
if (sides <= 2)
Q = vertex[i + outp];
R = vertex[i1 + outp];
if (!same_side(P, O, Q, R)) /* false if outside the segment's face */
- return FALSE;
+ return false;
/* else inside the segment face... */
if ((s = same_side(P, Q, R, O)) && same_side(P, R, O, Q)) /* true if between the segment's sides */
- return TRUE;
+ return true;
/* else maybe in another segment */
for (j = 1; j < sides; j++) { /* iterate over remaining segments */
if (s) { /* clockwise */
}
if (!same_side(P, O, vertex[i + outp], vertex[i1 + outp])) { /* false if outside any other segment's face */
last = i;
- return FALSE;
+ return false;
}
}
/* inside all segments' faces */
last = i; /* in case next edge is to same side */
- return TRUE;
+ return true;
}
/* poly_path:
ND_shape_info(n) = (void *) poly;
}
-static boolean point_inside(inside_t * inside_context, pointf p)
+static bool point_inside(inside_t * inside_context, pointf p)
{
static node_t *lastn; /* last node argument */
static double radius;
if (!inside_context) {
lastn = NULL;
- return FALSE;
+ return false;
}
n = inside_context->s.n;
/* inside bounding box? */
if (fabs(P.x) > radius || fabs(P.y) > radius)
- return FALSE;
+ return false;
return hypot(P.x, P.y) <= radius;
}
* Note that this does not handle Mrecords correctly. It assumes
* everything is a rectangle.
*/
-static boolean record_inside(inside_t * inside_context, pointf p)
+static bool record_inside(inside_t * inside_context, pointf p)
{
field_t *fld0;
return rv;
}
-static boolean epsf_inside(inside_t * inside_context, pointf p)
+static bool epsf_inside(inside_t * inside_context, pointf p)
{
pointf P;
double x2;
*bb = sz;
}
-static boolean star_inside(inside_t * inside_context, pointf p)
+static bool star_inside(inside_t * inside_context, pointf p)
{
static node_t *lastn; /* last node argument */
static polygon_t *poly;
if (!inside_context) {
lastn = NULL;
- return FALSE;
+ return false;
}
boxf *bp = inside_context->s.bp;
node_t *n = inside_context->s.n;
outcnt++;
}
if (outcnt == 2) {
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
/* cylinder:
* The points p are in node coordinates.
*/
void bezier_clip(inside_t * inside_context,
- boolean(*inside) (inside_t * inside_context, pointf p),
+ bool(*inside) (inside_t * inside_context, pointf p),
pointf * sp, bool left_inside)
{
pointf seg[4], best[4], pt, opt, *left, *right;
save_real_size = ND_rw(n);
c.x = curve[0].x - ND_coord(n).x;
c.y = curve[0].y - ND_coord(n).y;
- left_inside = ND_shape(n)->fns->insidefn(&inside_context, c) != FALSE;
+ left_inside = ND_shape(n)->fns->insidefn(&inside_context, c);
ND_rw(n) = save_real_size;
shape_clip0(&inside_context, n, curve, left_inside);
}