Graphviz 13.0.0~dev.20241220.2304
|
#include <assert.h>
#include <common/geomprocs.h>
#include <common/render.h>
#include <math.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <util/startswith.h>
#include <util/streq.h>
Go to the source code of this file.
Data Structures | |
struct | arrowdir_t |
struct | arrowname_t |
struct | arrowtype_t |
struct | triangle |
Macros | |
#define | EPSILON .0001 |
#define | ARROW_LENGTH 10. |
#define | NUMB_OF_ARROW_HEADS 4 |
#define | BITS_PER_ARROW 8 |
#define | BITS_PER_ARROW_TYPE 4 |
#define | ARR_TYPE_NONE (ARR_NONE) |
#define | ARR_TYPE_NORM 1 |
#define | ARR_TYPE_CROW 2 |
#define | ARR_TYPE_TEE 3 |
#define | ARR_TYPE_BOX 4 |
#define | ARR_TYPE_DIAMOND 5 |
#define | ARR_TYPE_DOT 6 |
#define | ARR_TYPE_CURVE 7 |
#define | ARR_TYPE_GAP 8 |
#define | ARR_MOD_OPEN (1<<(BITS_PER_ARROW_TYPE+0)) |
#define | ARR_MOD_INV (1<<(BITS_PER_ARROW_TYPE+1)) |
#define | ARR_MOD_LEFT (1<<(BITS_PER_ARROW_TYPE+2)) |
#define | ARR_MOD_RIGHT (1<<(BITS_PER_ARROW_TYPE+3)) |
Functions | |
static pointf | arrow_type_normal (GVJ_t *job, pointf p, pointf u, double arrowsize, double penwidth, uint32_t flag) |
static pointf | arrow_type_crow (GVJ_t *job, pointf p, pointf u, double arrowsize, double penwidth, uint32_t flag) |
static pointf | arrow_type_tee (GVJ_t *job, pointf p, pointf u, double arrowsize, double penwidth, uint32_t flag) |
static pointf | arrow_type_box (GVJ_t *job, pointf p, pointf u, double arrowsize, double penwidth, uint32_t flag) |
static pointf | arrow_type_diamond (GVJ_t *job, pointf p, pointf u, double arrowsize, double penwidth, uint32_t flag) |
static pointf | arrow_type_dot (GVJ_t *job, pointf p, pointf u, double arrowsize, double penwidth, uint32_t flag) |
static pointf | arrow_type_curve (GVJ_t *job, pointf p, pointf u, double arrowsize, double penwidth, uint32_t flag) |
static pointf | arrow_type_gap (GVJ_t *job, pointf p, pointf u, double arrowsize, double penwidth, uint32_t flag) |
static double | arrow_length_generic (double lenfact, double arrowsize, double penwidth, uint32_t flag) |
static double | arrow_length_crow (double lenfact, double arrowsize, double penwidth, uint32_t flag) |
static double | arrow_length_normal (double lenfact, double arrowsize, double penwidth, uint32_t flag) |
static double | arrow_length_tee (double lenfact, double arrowsize, double penwidth, uint32_t flag) |
static double | arrow_length_box (double lenfact, double arrowsize, double penwidth, uint32_t flag) |
static double | arrow_length_diamond (double lenfact, double arrowsize, double penwidth, uint32_t flag) |
static double | arrow_length_curve (double lenfact, double arrowsize, double penwidth, uint32_t flag) |
static double | arrow_length_dot (double lenfact, double arrowsize, double penwidth, uint32_t flag) |
static char * | arrow_match_name_frag (char *name, const arrowname_t *arrownames, uint32_t *flag) |
static char * | arrow_match_shape (char *name, uint32_t *flag) |
static void | arrow_match_name (char *name, uint32_t *flag) |
void | arrow_flags (Agedge_t *e, uint32_t *sflag, uint32_t *eflag) |
static double | arrow_length (edge_t *e, uint32_t flag) |
static bool | inside (inside_t *inside_context, pointf p) |
size_t | arrowEndClip (edge_t *e, pointf *ps, size_t startp, size_t endp, bezier *spl, uint32_t eflag) |
size_t | arrowStartClip (edge_t *e, pointf *ps, size_t startp, size_t endp, bezier *spl, uint32_t sflag) |
void | arrowOrthoClip (edge_t *e, pointf *ps, size_t startp, size_t endp, bezier *spl, uint32_t sflag, uint32_t eflag) |
static triangle | miter_shape (pointf base_left, pointf P, pointf base_right, double penwidth) |
static pointf | arrow_type_normal0 (pointf p, pointf u, double penwidth, uint32_t flag, pointf *a) |
static pointf | arrow_type_crow0 (pointf p, pointf u, double arrowsize, double penwidth, uint32_t flag, pointf *a) |
static pointf | arrow_type_diamond0 (pointf p, pointf u, double penwidth, uint32_t flag, pointf *a) |
static pointf | arrow_gen_type (GVJ_t *job, pointf p, pointf u, double arrowsize, double penwidth, uint32_t flag) |
boxf | arrow_bb (pointf p, pointf u, double arrowsize) |
void | arrow_gen (GVJ_t *job, emit_state_t emit_state, pointf p, pointf u, double arrowsize, double penwidth, uint32_t flag) |
Variables | |
static const arrowdir_t | Arrowdirs [] |
static const arrowname_t | Arrowsynonyms [] |
static const arrowname_t | Arrowmods [] |
static const arrowname_t | Arrownames [] |
static const arrowtype_t | Arrowtypes [] |
static const size_t | Arrowtypes_size |
#define ARR_MOD_INV (1<<(BITS_PER_ARROW_TYPE+1)) |
#define ARR_MOD_LEFT (1<<(BITS_PER_ARROW_TYPE+2)) |
#define ARR_MOD_OPEN (1<<(BITS_PER_ARROW_TYPE+0)) |
#define ARR_MOD_RIGHT (1<<(BITS_PER_ARROW_TYPE+3)) |
Definition at line 1112 of file arrows.c.
References ARROW_LENGTH, dx, dy, EPSILON, boxf::LL, boxf::UR, pointf_s::x, and pointf_s::y.
Referenced by init_splines_bb(), and overlap_arrow().
void arrow_flags | ( | Agedge_t * | e, |
uint32_t * | sflag, | ||
uint32_t * | eflag | ||
) |
Definition at line 217 of file arrows.c.
References agfindedge, agfindedgeattr, aghead, agisdirected(), agraphof(), agtail, agxget(), ARR_TYPE_NONE, ARR_TYPE_NORM, arrow_flags(), arrow_match_name(), Arrowdirs, arrowdir_t::dir, E_dir, ED_conc_opp_flag, NULL, and streq().
Referenced by arrow_clip(), arrow_flags(), and user_spline().
void arrow_gen | ( | GVJ_t * | job, |
emit_state_t | emit_state, | ||
pointf | p, | ||
pointf | u, | ||
double | arrowsize, | ||
double | penwidth, | ||
uint32_t | flag | ||
) |
Definition at line 1150 of file arrows.c.
References ARR_TYPE_NONE, arrow_gen_type(), ARROW_LENGTH, BITS_PER_ARROW, GVC_s::defaultlinestyle, obj_state_s::emit_state, EPSILON, GVJ_s::gvc, gvrender_set_penwidth(), gvrender_set_style(), NUMB_OF_ARROW_HEADS, GVJ_s::obj, penwidth, pointf_s::x, and pointf_s::y.
Referenced by emit_edge_graphics(), and multicolor().
|
static |
Definition at line 1097 of file arrows.c.
References Arrowtypes, Arrowtypes_size, BITS_PER_ARROW_TYPE, arrowtype_t::gen, arrowtype_t::lenfact, penwidth, arrowtype_t::type, pointf_s::x, and pointf_s::y.
Referenced by arrow_gen().
|
static |
Definition at line 252 of file arrows.c.
References Arrowtypes, Arrowtypes_size, BITS_PER_ARROW, BITS_PER_ARROW_TYPE, E_arrowsz, E_penwidth, late_double(), arrowtype_t::len, arrowtype_t::lenfact, NUMB_OF_ARROW_HEADS, penwidth, and arrowtype_t::type.
Referenced by arrowEndClip(), arrowOrthoClip(), and arrowStartClip().
|
static |
Definition at line 1261 of file arrows.c.
References ARROW_LENGTH, and penwidth.
|
static |
Definition at line 1327 of file arrows.c.
References ARR_MOD_INV, ARROW_LENGTH, arrow_type_crow0(), overlap(), penwidth, pointf_s::x, and pointf_s::y.
|
static |
Definition at line 1320 of file arrows.c.
References ARROW_LENGTH, and penwidth.
|
static |
Definition at line 1272 of file arrows.c.
References ARROW_LENGTH, arrow_type_diamond0(), overlap(), penwidth, pointf_s::x, and pointf_s::y.
|
static |
Definition at line 1313 of file arrows.c.
References ARROW_LENGTH, and penwidth.
|
static |
Definition at line 1187 of file arrows.c.
References ARROW_LENGTH, and penwidth.
|
static |
Definition at line 1195 of file arrows.c.
References ARR_MOD_INV, ARROW_LENGTH, arrow_type_normal0(), overlap(), penwidth, pointf_s::x, and pointf_s::y.
|
static |
Definition at line 1234 of file arrows.c.
References ARROW_LENGTH, and penwidth.
|
static |
Definition at line 194 of file arrows.c.
References agwarningf(), ARR_TYPE_GAP, ARR_TYPE_NONE, arrow_match_shape(), BITS_PER_ARROW, and NUMB_OF_ARROW_HEADS.
Referenced by arrow_flags().
|
static |
Definition at line 159 of file arrows.c.
References arrowname_t::name, and startswith().
Referenced by arrow_match_shape().
|
static |
Definition at line 176 of file arrows.c.
References ARR_TYPE_NONE, ARR_TYPE_NORM, arrow_match_name_frag(), Arrowmods, Arrownames, Arrowsynonyms, and BITS_PER_ARROW_TYPE.
Referenced by arrow_match_name().
|
static |
Definition at line 873 of file arrows.c.
References ARR_MOD_LEFT, ARR_MOD_OPEN, ARR_MOD_RIGHT, delta, gvrender_polygon(), gvrender_polyline(), penwidth, pointf_s::x, and pointf_s::y.
|
static |
Definition at line 779 of file arrows.c.
References ARR_MOD_LEFT, ARR_MOD_RIGHT, arrow_type_crow0(), gvrender_polygon(), and penwidth.
|
static |
Definition at line 637 of file arrows.c.
References add_pointf(), alpha, ARR_MOD_INV, ARR_MOD_LEFT, ARR_MOD_RIGHT, miter_shape(), penwidth, triangle::points, sub_pointf(), pointf_s::x, and pointf_s::y.
Referenced by arrow_length_crow(), and arrow_type_crow().
|
static |
Definition at line 1036 of file arrows.c.
References ARR_MOD_INV, ARR_MOD_LEFT, ARR_MOD_RIGHT, Bezier(), delta, gvrender_beziercurve(), gvrender_polyline(), NULL, penwidth, pointf_s::x, and pointf_s::y.
|
static |
Definition at line 973 of file arrows.c.
References ARR_MOD_LEFT, ARR_MOD_OPEN, ARR_MOD_RIGHT, arrow_type_diamond0(), gvrender_polygon(), and penwidth.
|
static |
Definition at line 931 of file arrows.c.
References add_pointf(), ARR_MOD_LEFT, ARR_MOD_RIGHT, delta, miter_shape(), penwidth, triangle::points, scale(), sub_pointf(), pointf_s::x, and pointf_s::y.
Referenced by arrow_length_diamond(), and arrow_type_diamond().
|
static |
Definition at line 992 of file arrows.c.
References ARR_MOD_OPEN, delta, gvrender_ellipse(), penwidth, pointf_s::x, and pointf_s::y.
|
static |
Definition at line 796 of file arrows.c.
References gvrender_polyline(), penwidth, pointf_s::x, and pointf_s::y.
|
static |
Definition at line 618 of file arrows.c.
References ARR_MOD_LEFT, ARR_MOD_OPEN, ARR_MOD_RIGHT, arrow_type_normal0(), gvrender_polygon(), and penwidth.
|
static |
Definition at line 521 of file arrows.c.
References alpha, ARR_MOD_INV, ARR_MOD_LEFT, ARR_MOD_RIGHT, miter_shape(), penwidth, triangle::points, sub_pointf(), pointf_s::x, and pointf_s::y.
Referenced by arrow_length_normal(), and arrow_type_normal().
|
static |
Definition at line 813 of file arrows.c.
References ARR_MOD_LEFT, ARR_MOD_RIGHT, delta, gvrender_polygon(), gvrender_polyline(), penwidth, sub_pointf(), pointf_s::x, and pointf_s::y.
size_t arrowEndClip | ( | edge_t * | e, |
pointf * | ps, | ||
size_t | startp, | ||
size_t | endp, | ||
bezier * | spl, | ||
uint32_t | eflag | ||
) |
Definition at line 284 of file arrows.c.
References inside_t::a, arrow_length(), bezier_clip(), DIST2, bezier::eflag, bezier::ep, inside(), inside_t::p, ps, and inside_t::r.
Referenced by arrow_clip(), and makeCompoundEdge().
void arrowOrthoClip | ( | edge_t * | e, |
pointf * | ps, | ||
size_t | startp, | ||
size_t | endp, | ||
bezier * | spl, | ||
uint32_t | sflag, | ||
uint32_t | eflag | ||
) |
Definition at line 355 of file arrows.c.
References arrow_length(), DIST, bezier::eflag, bezier::ep, ps, bezier::sflag, bezier::sp, pointf_s::x, and pointf_s::y.
Referenced by arrow_clip().
size_t arrowStartClip | ( | edge_t * | e, |
pointf * | ps, | ||
size_t | startp, | ||
size_t | endp, | ||
bezier * | spl, | ||
uint32_t | sflag | ||
) |
Definition at line 315 of file arrows.c.
References inside_t::a, arrow_length(), bezier_clip(), DIST2, inside(), inside_t::p, ps, inside_t::r, bezier::sflag, and bezier::sp.
Referenced by arrow_clip(), and makeCompoundEdge().
Definition at line 279 of file arrows.c.
References inside_t::a, DIST2, inside_t::p, and inside_t::r.
Referenced by arrowEndClip(), arrowStartClip(), and bezier_clip().
|
static |
Definition at line 455 of file arrows.c.
References A, alpha, B, M_PI, penwidth, pointf_s::x, and pointf_s::y.
Referenced by arrow_type_crow0(), arrow_type_diamond0(), and arrow_type_normal0().
|
static |
|
static |
Definition at line 81 of file arrows.c.
Referenced by arrow_match_shape().
|
static |
Definition at line 91 of file arrows.c.
Referenced by arrow_match_shape().
|
static |
Definition at line 74 of file arrows.c.
Referenced by arrow_match_shape().
|
static |
Definition at line 145 of file arrows.c.
Referenced by arrow_gen_type(), and arrow_length().
|
static |
Definition at line 156 of file arrows.c.
Referenced by arrow_gen_type(), and arrow_length().