Graphviz 13.0.0~dev.20241220.2304
|
#include <assert.h>
#include <common/render.h>
#include <common/htmltable.h>
#include <float.h>
#include <limits.h>
#include <math.h>
#include <stddef.h>
#include <stdbool.h>
#include <string.h>
#include <util/alloc.h>
#include <util/gv_math.h>
#include <util/streq.h>
#include <util/unreachable.h>
Go to the source code of this file.
Data Structures | |
struct | poly_desc_t |
Macros | |
#define | RBCONST 12 |
#define | RBCURVE .5 |
#define | ATTR_SET(a, n) ((a) && (*(agxget(n,a->index)) != '\0')) |
#define | DEF_POINT 0.05 |
#define | MIN_POINT 0.0003 |
#define | HASTEXT 1 |
#define | HASPORT 2 |
#define | HASTABLE 4 |
#define | INTEXT 8 |
#define | INPORT 16 |
#define | alpha (M_PI/10.0) |
#define | alpha2 (2*alpha) |
#define | alpha3 (3*alpha) |
#define | alpha4 (2*alpha2) |
Functions | |
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 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 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 bool | point_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 bool | star_inside (inside_t *inside_context, pointf p) |
static pointf | cylinder_size (pointf) |
static void | cylinder_vertices (pointf *, pointf *) |
static void | cylinder_draw (GVJ_t *job, pointf *AF, size_t sides, int filled) |
static bool | IS_BOX (node_t *n) |
static bool | IS_PLAIN (node_t *n) |
static bool | SPECIAL_CORNERS (graphviz_polygon_style_t style) |
True if style requires processing through round_corners. | |
static void | unrecognized (node_t *n, char *p) |
static double | quant (double val, double q) |
static int | same_side (pointf p0, pointf p1, pointf L0, pointf L1) |
static char * | penColor (GVJ_t *job, node_t *n) |
static char * | findFillDflt (node_t *n, char *dflt) |
static char * | findFill (node_t *n) |
static bool | isBox (node_t *n) |
static bool | isEllipse (node_t *n) |
static graphviz_polygon_style_t | style_or (graphviz_polygon_style_t a, graphviz_polygon_style_t b) |
bitwise-OR styles | |
static char ** | checkStyle (node_t *n, graphviz_polygon_style_t *flagp) |
static graphviz_polygon_style_t | stylenode (GVJ_t *job, node_t *n) |
static void | Mcircle_hack (GVJ_t *job, node_t *n) |
static pointf * | alloc_interpolation_points (pointf *AF, size_t sides, graphviz_polygon_style_t style, bool rounded) |
static void | diagonals_draw (GVJ_t *job, pointf *AF, size_t sides, graphviz_polygon_style_t style, int filled) |
draws polygons with diagonals on corners | |
static void | rounded_draw (GVJ_t *job, pointf *AF, size_t sides, graphviz_polygon_style_t style, int filled) |
draws rounded polygons with Bézier curve | |
static double | mid_x (const pointf line[2]) |
X coordinate of line midpoint. | |
static double | mid_y (const pointf line[2]) |
Y coordinate of line midpoint. | |
void | round_corners (GVJ_t *job, pointf *AF, size_t sides, graphviz_polygon_style_t style, int filled) |
Handle some special graphical cases, such as rounding the shape, adding diagonals at corners, or drawing certain non-simple figures. | |
static double | userSize (node_t *n) |
shape_kind | shapeOf (node_t *n) |
bool | isPolygon (node_t *n) |
static unsigned char | invflip_side (unsigned char side, int rankdir) |
static double | invflip_angle (double angle, int rankdir) |
static pointf | compassPoint (inside_t *ictxt, double y, double x) |
static int | compassPort (node_t *n, boxf *bp, port *pp, const char *compass, unsigned char sides, inside_t *ictxt) |
static bool | multicolor (const char *f) |
static bool | ISCTRL (int c) |
static void | free_field (field_t *f) |
static field_t * | parse_error (field_t *rv, char *portname) |
static field_t * | parse_reclbl (node_t *n, bool LR, bool flag, char *text) |
static pointf | size_reclbl (node_t *n, field_t *f) |
static void | resize_reclbl (field_t *f, pointf sz, bool nojustify_p) |
static void | pos_reclbl (field_t *f, pointf ul, unsigned char sides) |
static field_t * | map_rec_port (field_t *f, char *str) |
static void | gen_fields (GVJ_t *job, node_t *n, field_t *f) |
shape_desc * | find_user_shape (const char *name) |
static shape_desc * | user_shape (char *name) |
shape_desc * | bind_shape (char *name, node_t *np) |
static pointf | cvtPt (pointf p, int rankdir) |
static const char * | closestSide (node_t *n, node_t *other, port *oldport) |
port | resolvePort (node_t *n, node_t *other, port *oldport) |
void | resolvePorts (edge_t *e) |
Variables | |
static port | Center = {.theta = -1, .clip = true} |
static char * | point_style [3] = { "invis\0", "filled\0", 0 } |
static poly_desc_t | star_gen |
static poly_desc_t | cylinder_gen |
static polygon_t | p_polygon = {.peripheries = 1} |
static polygon_t | p_ellipse = {.peripheries = 1, .sides = 1} |
static polygon_t | p_circle = {.regular = true, .peripheries = 1, .sides = 1} |
static polygon_t | p_egg = {.peripheries = 1, .sides = 1, .distortion = -0.3} |
static polygon_t | p_triangle = {.peripheries = 1, .sides = 3} |
static polygon_t | p_box = {.peripheries = 1, .sides = 4} |
static polygon_t | p_square = {.regular = true, .peripheries = 1, .sides = 4} |
static polygon_t | p_plaintext = {.sides = 4} |
static polygon_t | p_plain = {.sides = 4} |
static polygon_t | p_diamond = {.peripheries = 1, .sides = 4, .orientation = 45.0} |
static polygon_t | p_trapezium = {.peripheries = 1, .sides = 4, .distortion = -0.4} |
static polygon_t | p_parallelogram = {.peripheries = 1, .sides = 4, .skew = 0.6} |
static polygon_t | p_house = {.peripheries = 1, .sides = 5, .distortion = -0.64} |
static polygon_t | p_pentagon = {.peripheries = 1, .sides = 5} |
static polygon_t | p_hexagon = {.peripheries = 1, .sides = 6} |
static polygon_t | p_septagon = {.peripheries = 1, .sides = 7} |
static polygon_t | p_octagon = {.peripheries = 1, .sides = 8} |
static polygon_t | p_note |
static polygon_t | p_tab |
static polygon_t | p_folder |
static polygon_t | p_box3d |
static polygon_t | p_component |
static polygon_t | p_underline |
static polygon_t | p_cylinder |
static polygon_t | p_doublecircle |
static polygon_t | p_invtriangle |
static polygon_t | p_invtrapezium |
static polygon_t | p_invhouse |
static polygon_t | p_doubleoctagon = {.peripheries = 2, .sides = 8} |
static polygon_t | p_tripleoctagon = {.peripheries = 3, .sides = 8} |
static polygon_t | p_Mdiamond |
static polygon_t | p_Msquare |
static polygon_t | p_Mcircle |
static polygon_t | p_star |
static polygon_t | p_promoter |
static polygon_t | p_cds |
static polygon_t | p_terminator |
static polygon_t | p_utr |
static polygon_t | p_insulator |
static polygon_t | p_ribosite |
static polygon_t | p_rnastab |
static polygon_t | p_proteasesite |
static polygon_t | p_proteinstab |
static polygon_t | p_primersite |
static polygon_t | p_restrictionsite |
static polygon_t | p_fivepoverhang |
static polygon_t | p_threepoverhang |
static polygon_t | p_noverhang |
static polygon_t | p_assembly |
static polygon_t | p_signature |
static polygon_t | p_rpromoter |
static polygon_t | p_rarrow |
static polygon_t | p_larrow |
static polygon_t | p_lpromoter |
static shape_functions | poly_fns |
static shape_functions | point_fns |
static shape_functions | record_fns |
static shape_functions | epsf_fns |
static shape_functions | star_fns |
static shape_functions | cylinder_fns |
static shape_desc | Shapes [] |
static char * | reclblp |
static shape_desc ** | UserShape |
static size_t | N_UserShape |
static const char * | side_port [] = {"s", "e", "n", "w"} |
Definition in file shapes.c.
#define ATTR_SET | ( | a, | |
n | |||
) | ((a) && (*(agxget(n,a->index)) != '\0')) |
|
static |
Definition at line 564 of file shapes.c.
References B, BOX3D, COMPONENT, DOGEAR, dx, dy, gv_calloc(), interpolate_pointf(), RBCONST, RBCURVE, graphviz_polygon_style_t::shape, pointf_s::x, and pointf_s::y.
Referenced by diagonals_draw(), round_corners(), and rounded_draw().
shape_desc * bind_shape | ( | char * | name, |
node_t * | np | ||
) |
Definition at line 3994 of file shapes.c.
References agget(), shape_desc::name, NULL, safefile(), Shapes, str, streq(), and user_shape().
Referenced by common_init_node().
|
static |
Definition at line 463 of file shapes.c.
References graphviz_polygon_style_t::diagonals, graphviz_polygon_style_t::filled, graphviz_polygon_style_t::invisible, isBox(), isEllipse(), late_nnstring(), N_style, ND_shape, parse_style(), graphviz_polygon_style_t::radial, graphviz_polygon_style_t::rounded, streq(), graphviz_polygon_style_t::striped, style_or(), and graphviz_polygon_style_t::wedged.
Referenced by point_gencode(), and stylenode().
Definition at line 4283 of file shapes.c.
References agraphof(), BOTTOM, BOTTOM_IX, port::bp, cvtPt(), DIST2, GD_flip, GD_rankdir, LEFT, LEFT_IX, boxf::LL, ND_coord, ND_ht, ND_lw, NULL, RIGHT, RIGHT_IX, port::side, side_port, TOP, TOP_IX, UNREACHABLE, boxf::UR, pointf_s::x, and pointf_s::y.
Referenced by resolvePort().
Definition at line 2648 of file shapes.c.
References agraphof(), bezier_clip(), ccwrotatepf(), cwrotatepf(), GD_rankdir, inside_t::n, ND_shape, inside_t::s, pointf_s::x, and pointf_s::y.
Referenced by compassPort().
|
static |
Definition at line 2696 of file shapes.c.
References agraphof(), BOTTOM, port::bp, port::clip, compassPoint(), port::constrained, cwrotatepf(), port::defined, port::dyna, GD_flip, GD_rankdir, invflip_angle(), invflip_side(), LEFT, boxf::LL, M_PI, MC_SCALE, ND_ht, ND_lw, port::order, port::p, RIGHT, port::side, port::theta, TOP, boxf::UR, pointf_s::x, and pointf_s::y.
Referenced by poly_port(), record_port(), and resolvePort().
Definition at line 4247 of file shapes.c.
References RANKDIR_BT, RANKDIR_LR, RANKDIR_RL, RANKDIR_TB, UNREACHABLE, pointf_s::x, and pointf_s::y.
Referenced by closestSide().
Definition at line 4223 of file shapes.c.
References gvrender_beziercurve(), pointf_s::x, and pointf_s::y.
Referenced by round_corners().
Definition at line 4177 of file shapes.c.
References pointf_s::y.
Definition at line 4183 of file shapes.c.
References pointf_s::x, and pointf_s::y.
|
static |
Diagonals are weird. Rewrite someday.
Definition at line 622 of file shapes.c.
References alloc_interpolation_points(), B, C, free(), gvrender_polygon(), and gvrender_polyline().
Referenced by round_corners().
Definition at line 4027 of file shapes.c.
References EMIT_CLUSTERS_LAST, emit_label(), EMIT_NLABEL, obj_state_s::explicit_tooltip, GVJ_s::flags, gvrender_begin_anchor(), gvrender_end_anchor(), obj_state_s::id, epsf_s::macro_id, ND_coord, ND_label, ND_shape_info, GVJ_s::obj, epsf_s::offset, GVJ_s::output_file, obj_state_s::target, obj_state_s::tooltip, obj_state_s::url, pointf_s::x, and pointf_s::y.
Definition at line 4016 of file shapes.c.
References agraphof(), ccwrotatepf(), GD_rankdir, inside_t::n, ND_ht, ND_lw, ND_rw, inside_t::s, pointf_s::x, and pointf_s::y.
shape_desc * find_user_shape | ( | const char * | name | ) |
Definition at line 3962 of file shapes.c.
References N_UserShape, NULL, streq(), and UserShape.
Referenced by gvrender_usershape(), gvusershape_open(), and user_shape().
|
static |
Definition at line 415 of file shapes.c.
References DEFAULT_FILL, and findFillDflt().
Referenced by poly_gencode(), and record_gencode().
|
static |
Definition at line 399 of file shapes.c.
References color(), late_nnstring(), N_color, and N_fillcolor.
Referenced by findFill(), and point_gencode().
|
static |
Definition at line 3357 of file shapes.c.
References field_t::fld, free(), free_field(), free_label(), field_t::id, field_t::lp, and field_t::n_flds.
Referenced by free_field(), parse_error(), and record_free().
Definition at line 3855 of file shapes.c.
References add_pointf(), field_t::b, coord(), emit_label(), EMIT_NLABEL, field_t::fld, gen_fields(), gvrender_polyline(), boxf::LL, field_t::lp, field_t::LR, mid_pointf(), field_t::n_flds, ND_coord, penColor(), textlabel_t::pos, boxf::UR, pointf_s::x, and pointf_s::y.
Referenced by gen_fields(), and record_gencode().
|
static |
Definition at line 2604 of file shapes.c.
References M_PI, RANKDIR_BT, RANKDIR_LR, RANKDIR_RL, RANKDIR_TB, and UNREACHABLE.
Referenced by compassPort().
|
static |
Definition at line 2546 of file shapes.c.
References BOTTOM, LEFT, RANKDIR_BT, RANKDIR_LR, RANKDIR_RL, RANKDIR_TB, RIGHT, TOP, and UNREACHABLE.
Referenced by compassPort().
|
static |
Definition at line 203 of file shapes.c.
References ND_shape, and p_box.
Referenced by poly_port().
|
static |
Definition at line 207 of file shapes.c.
References ND_shape, and p_plain.
Referenced by poly_init().
|
static |
Definition at line 420 of file shapes.c.
References polygon_t::distortion, is_exactly_zero(), ND_shape, polygon_t::orientation, polygon_t::sides, and polygon_t::skew.
Referenced by checkStyle(), and poly_init().
|
static |
Definition at line 3351 of file shapes.c.
Referenced by parse_reclbl().
|
static |
Definition at line 430 of file shapes.c.
References ND_shape, and polygon_t::sides.
Referenced by checkStyle().
bool isPolygon | ( | node_t * | n | ) |
Definition at line 1926 of file shapes.c.
References ND_shape, and poly_init().
Referenced by attach_attrs_and_arrows().
Definition at line 3740 of file shapes.c.
References field_t::fld, field_t::id, map_rec_port(), field_t::n_flds, NULL, str, streq(), and sub.
Referenced by map_rec_port(), and record_port().
Definition at line 545 of file shapes.c.
References add_pointf(), gvrender_polyline(), ND_coord, ND_ht, ND_rw, pointf_s::x, and pointf_s::y.
Referenced by poly_gencode().
|
static |
line | two points |
Definition at line 685 of file shapes.c.
Referenced by round_corners().
|
static |
line | two points |
Definition at line 694 of file shapes.c.
Referenced by round_corners().
|
static |
Definition at line 2915 of file shapes.c.
References NULL.
Referenced by poly_gencode().
Definition at line 3374 of file shapes.c.
References free(), free_field(), and NULL.
Referenced by parse_reclbl().
Definition at line 3380 of file shapes.c.
References cnt(), field_t::fld, textlabel_t::fontcolor, textlabel_t::fontname, textlabel_t::fontsize, gv_alloc(), gv_calloc(), gv_strdup(), HASPORT, HASTABLE, HASTEXT, textlabel_t::html, field_t::id, INPORT, INTEXT, ISCTRL(), field_t::lp, LR, field_t::LR, LT_HTML, LT_NONE, make_label(), field_t::n_flds, ND_label, NULL, parse_error(), parse_reclbl(), and reclblp.
Referenced by parse_reclbl(), and record_init().
Definition at line 387 of file shapes.c.
References color(), DEFAULT_COLOR, gvrender_set_pencolor(), late_nnstring(), and N_color.
Referenced by gen_fields(), point_gencode(), poly_gencode(), and record_gencode().
Definition at line 3257 of file shapes.c.
References checkStyle(), color(), DEFAULT_ACTIVEFILLCOLOR, DEFAULT_ACTIVEPENCOLOR, DEFAULT_DELETEDFILLCOLOR, DEFAULT_DELETEDPENCOLOR, DEFAULT_SELECTEDFILLCOLOR, DEFAULT_SELECTEDPENCOLOR, DEFAULT_VISITEDFILLCOLOR, DEFAULT_VISITEDPENCOLOR, EMIT_CLUSTERS_LAST, obj_state_s::explicit_tooltip, findFillDflt(), GVJ_s::flags, GUI_STATE_ACTIVE, GUI_STATE_DELETED, GUI_STATE_SELECTED, GUI_STATE_VISITED, gvrender_begin_anchor(), gvrender_ellipse(), gvrender_end_anchor(), gvrender_set_fillcolor(), gvrender_set_pencolor(), gvrender_set_penwidth(), gvrender_set_style(), obj_state_s::id, graphviz_polygon_style_t::invisible, late_double(), N_penwidth, ND_coord, ND_gui_state, ND_shape_info, GVJ_s::obj, penColor(), point_style, obj_state_s::target, obj_state_s::tooltip, obj_state_s::url, pointf_s::x, and pointf_s::y.
|
static |
Definition at line 3125 of file shapes.c.
References DEF_POINT, DEFAULT_NODEPENWIDTH, GAP, gv_alloc(), gv_calloc(), is_exactly_equal(), late_double(), late_int(), MIN_NODEHEIGHT, MIN_NODEPENWIDTH, MIN_NODEWIDTH, MIN_POINT, N_height, N_penwidth, N_peripheries, N_width, ND_height, ND_outline_height, ND_outline_width, ND_shape, ND_shape_info, ND_width, penwidth, POINTS_PER_INCH, PS2INCH, pointf_s::x, and pointf_s::y.
Referenced by shapeOf().
Definition at line 3216 of file shapes.c.
References agraphof(), ccwrotatepf(), DEFAULT_NODEPENWIDTH, GD_rankdir, inside_t::lastn, late_double(), MIN_NODEPENWIDTH, inside_t::n, N_penwidth, ND_shape_info, penwidth, inside_t::radius, inside_t::s, pointf_s::x, and pointf_s::y.
|
static |
Definition at line 2383 of file shapes.c.
References free(), ND_shape_info, and polygon_t::vertices.
Definition at line 2920 of file shapes.c.
References agerr(), agget(), agnameof(), AGPREV, color(), DEFAULT_ACTIVEFILLCOLOR, DEFAULT_ACTIVEPENCOLOR, DEFAULT_COLOR, DEFAULT_DELETEDFILLCOLOR, DEFAULT_DELETEDPENCOLOR, DEFAULT_SELECTEDFILLCOLOR, DEFAULT_SELECTEDPENCOLOR, DEFAULT_VISITEDFILLCOLOR, DEFAULT_VISITEDPENCOLOR, graphviz_polygon_style_t::diagonals, EMIT_CLUSTERS_LAST, emit_label(), EMIT_NLABEL, obj_state_s::explicit_tooltip, FILL, graphviz_polygon_style_t::filled, findFill(), findStopColor(), GVJ_s::flags, free(), GRADIENT, GUI_STATE_ACTIVE, GUI_STATE_DELETED, GUI_STATE_SELECTED, GUI_STATE_VISITED, gv_calloc(), gvrender_begin_anchor(), gvrender_ellipse(), gvrender_end_anchor(), gvrender_polygon(), gvrender_polyline(), gvrender_set_fillcolor(), gvrender_set_gradient_vals(), gvrender_set_pencolor(), gvrender_usershape(), obj_state_s::id, INCH2PS, late_int(), late_string(), Mcircle_hack(), multicolor(), N_gradientangle, N_imagepos, N_imagescale, ND_coord, ND_gui_state, ND_height, ND_ht, ND_label, ND_lw, ND_rw, ND_shape, ND_shape_info, ND_width, NULL, GVJ_s::obj, penColor(), graphviz_polygon_style_t::radial, RGRADIENT, round_corners(), graphviz_polygon_style_t::rounded, SPECIAL_CORNERS(), streq(), graphviz_polygon_style_t::striped, stripedBox(), stylenode(), obj_state_s::target, obj_state_s::tooltip, graphviz_polygon_style_t::underline, obj_state_s::url, graphviz_polygon_style_t::wedged, wedgedEllipse(), pointf_s::x, and pointf_s::y.
|
static |
Definition at line 1931 of file shapes.c.
References agget(), agnameof(), agraphof(), agwarningf(), alpha, DEFAULT_NODEPENWIDTH, GAP, GD_drawing, GD_has_images, gv_alloc(), gv_calloc(), gvusershape_size(), INCH2PS, is_exactly_equal(), is_exactly_zero(), IS_PLAIN(), isBox(), late_double(), late_int(), late_string(), M_PI, mapbool(), MIN_NODEPENWIDTH, N_distortion, N_fixed, N_nojustify, N_orientation, N_penwidth, N_peripheries, N_sides, N_skew, ND_height, ND_label, ND_outline_height, ND_outline_width, ND_shape, ND_shape_info, ND_width, PAD, penwidth, PS2INCH, quant(), RADIANS, poly_desc_t::size_gen, SQR, SQRT2, streq(), userSize(), poly_desc_t::vertex_gen, point::x, pointf_s::x, xmax, point::y, pointf_s::y, and ymax.
Referenced by isPolygon(), and shapeOf().
Definition at line 2399 of file shapes.c.
References agraphof(), bbox(), inside_t::box_URx, inside_t::box_URy, inside_t::bp, ccwrotatepf(), DEFAULT_NODEPENWIDTH, graphviz_polygon_style_t::fixedshape, GD_flip, GD_rankdir, INCH2PS, INSIDE, is_exactly_zero(), inside_t::last, inside_t::last_poly, inside_t::lastn, late_double(), boxf::LL, MIN_NODEPENWIDTH, inside_t::n, N_penwidth, ND_height, ND_ht, ND_lw, ND_outline_height, ND_outline_width, ND_rw, ND_shape_info, ND_width, NULL, O, polygon_t::option, inside_t::outp, penwidth, polygon_t::peripheries, polyBB(), inside_t::s, same_side(), inside_t::scalex, inside_t::scaley, polygon_t::sides, boxf::UR, polygon_t::vertices, pointf_s::x, and pointf_s::y.
Definition at line 2878 of file shapes.c.
References agnameof(), agwarningf(), BOTTOM, inside_t::bp, Center, compassPort(), html_port(), IS_BOX(), LEFT, inside_t::n, port::name, ND_label, NULL, RIGHT, inside_t::s, TOP, and unrecognized().
Definition at line 3613 of file shapes.c.
References field_t::b, BOTTOM, field_t::fld, last, LEFT, boxf::LL, field_t::LR, field_t::n_flds, pos_reclbl(), RIGHT, field_t::sides, field_t::size, TOP, boxf::UR, pointf_s::x, and pointf_s::y.
Referenced by pos_reclbl(), and record_init().
|
static |
Definition at line 365 of file shapes.c.
Referenced by poly_init().
|
static |
Definition at line 3733 of file shapes.c.
References free_field(), and ND_shape_info.
Definition at line 3886 of file shapes.c.
References field_t::b, DEFAULT_COLOR, EMIT_CLUSTERS_LAST, obj_state_s::explicit_tooltip, FILL, graphviz_polygon_style_t::filled, findFill(), findStopColor(), GVJ_s::flags, free(), gen_fields(), GRADIENT, gvrender_begin_anchor(), gvrender_box(), gvrender_end_anchor(), gvrender_set_fillcolor(), gvrender_set_gradient_vals(), obj_state_s::id, late_int(), boxf::LL, N_gradientangle, ND_coord, ND_shape, ND_shape_info, GVJ_s::obj, penColor(), graphviz_polygon_style_t::radial, RGRADIENT, round_corners(), graphviz_polygon_style_t::rounded, SPECIAL_CORNERS(), streq(), stylenode(), obj_state_s::target, obj_state_s::tooltip, boxf::UR, obj_state_s::url, pointf_s::x, and pointf_s::y.
|
static |
Definition at line 3687 of file shapes.c.
References agerrorf(), agraphof(), BOTTOM, free(), GD_realflip, gv_calloc(), INCH2PS, late_string(), LEFT, len(), mapbool(), MAX, N_fixed, N_nojustify, ND_height, ND_label, ND_shape_info, ND_width, parse_reclbl(), pos_reclbl(), PS2INCH, reclblp, resize_reclbl(), RIGHT, size_reclbl(), TOP, pointf_s::x, and pointf_s::y.
Referenced by shapeOf().
Definition at line 3786 of file shapes.c.
References add_pointf(), agraphof(), field_t::b, bbox(), inside_t::bp, ccwrotatepf(), DEFAULT_NODEPENWIDTH, GD_rankdir, INSIDE, late_double(), boxf::LL, MIN_NODEPENWIDTH, inside_t::n, N_penwidth, ND_shape_info, NULL, penwidth, inside_t::s, sub_pointf(), and boxf::UR.
Definition at line 3817 of file shapes.c.
References agraphof(), BETWEEN, port::defined, flip_rec_boxf(), GD_flip, boxf::LL, ND_coord, ND_ht, ND_shape_info, port::p, boxf::UR, pointf_s::x, and pointf_s::y.
Definition at line 3756 of file shapes.c.
References agnameof(), agwarningf(), field_t::b, BOTTOM, Center, compassPort(), LEFT, map_rec_port(), ND_shape_info, NULL, RIGHT, field_t::sides, TOP, and unrecognized().
Definition at line 3571 of file shapes.c.
References field_t::fld, field_t::lp, field_t::LR, field_t::n_flds, resize_reclbl(), field_t::size, textlabel_t::space, pointf_s::x, and pointf_s::y.
Referenced by record_init(), and resize_reclbl().
Definition at line 4346 of file shapes.c.
References port::bp, closestSide(), compassPort(), port::name, NULL, and port::side.
Referenced by beginpath(), endpath(), and resolvePorts().
void resolvePorts | ( | edge_t * | e | ) |
Definition at line 4358 of file shapes.c.
References aghead, agtail, ED_head_port, ED_tail_port, and resolvePort().
Referenced by splineEdges().
void round_corners | ( | GVJ_t * | job, |
pointf * | AF, | ||
size_t | sides, | ||
graphviz_polygon_style_t | style, | ||
int | filled | ||
) |
Any drawing done here should assume fillcolors, pencolors, etc. have been set by the calling routine. Normally, the drawing should consist of a region, filled or unfilled, followed by additional line segments. A single fill is necessary for gradient colors to work.
Definition at line 707 of file shapes.c.
References alloc_interpolation_points(), ASSEMBLY, B, BOX3D, C, CDS, COMPONENT, CYLINDER, cylinder_draw(), D, graphviz_polygon_style_t::diagonals, diagonals_draw(), DOGEAR, FIVEPOVERHANG, FOLDER, free(), gv_calloc(), gvrender_polygon(), gvrender_polyline(), INSULATOR, LARROW, LPROMOTER, mid_x(), mid_y(), NOVERHANG, NULL, PRIMERSITE, PROMOTER, PROTEASESITE, PROTEINSTAB, RARROW, RESTRICTIONSITE, RIBOSITE, RNASTAB, graphviz_polygon_style_t::rounded, rounded_draw(), RPROMOTER, graphviz_polygon_style_t::shape, SIGNATURE, TAB, TERMINATOR, THREEPOVERHANG, UNREACHABLE, UTR, pointf_s::x, and pointf_s::y.
Referenced by doBorder(), emit_clusters(), emit_html_cell(), emit_html_tbl(), poly_gencode(), and record_gencode().
|
static |
For example, a rounded star looks like a cartoon starfish.
Definition at line 641 of file shapes.c.
References alloc_interpolation_points(), B, free(), gv_calloc(), and gvrender_beziercurve().
Referenced by round_corners().
Definition at line 371 of file shapes.c.
References s1(), pointf_s::x, and pointf_s::y.
Referenced by poly_inside(), and star_inside().
shape_kind shapeOf | ( | node_t * | n | ) |
Definition at line 1906 of file shapes.c.
References epsf_init(), ND_shape, point_init(), poly_init(), record_init(), SH_EPSF, SH_POINT, SH_POLY, SH_RECORD, and SH_UNSET.
Referenced by cloneNode(), common_init_node(), emit_begin_node(), make_flat_adj_edges(), makeAddPoly(), makeObstacle(), and makePoly().
Definition at line 3526 of file shapes.c.
References agget(), textlabel_t::dimen, field_t::fld, INCH2PS, field_t::lp, field_t::LR, field_t::n_flds, PAD, field_t::size, size_reclbl(), pointf_s::x, and pointf_s::y.
Referenced by record_init(), and size_reclbl().
|
static |
Definition at line 212 of file shapes.c.
References graphviz_polygon_style_t::diagonals, graphviz_polygon_style_t::rounded, and graphviz_polygon_style_t::shape.
Referenced by poly_gencode(), and record_gencode().
Definition at line 4113 of file shapes.c.
References agraphof(), bbox(), inside_t::bp, ccwrotatepf(), DEFAULT_NODEPENWIDTH, GD_rankdir, INSIDE, inside_t::last_poly, inside_t::lastn, late_double(), MIN_NODEPENWIDTH, inside_t::n, N_penwidth, ND_shape_info, O, inside_t::outp, penwidth, polygon_t::peripheries, inside_t::s, same_side(), polygon_t::sides, and polygon_t::vertices.
Definition at line 4063 of file shapes.c.
References alpha, alpha2, alpha3, alpha4, pointf_s::x, and pointf_s::y.
Definition at line 4078 of file shapes.c.
References alpha, alpha2, alpha3, alpha4, offset, pointf_s::x, and pointf_s::y.
|
static |
Definition at line 440 of file shapes.c.
References graphviz_polygon_style_t::auxlabels, graphviz_polygon_style_t::dashed, graphviz_polygon_style_t::diagonals, graphviz_polygon_style_t::dotted, graphviz_polygon_style_t::filled, graphviz_polygon_style_t::fixedshape, graphviz_polygon_style_t::invisible, graphviz_polygon_style_t::radial, graphviz_polygon_style_t::rounded, graphviz_polygon_style_t::shape, graphviz_polygon_style_t::striped, graphviz_polygon_style_t::underline, and graphviz_polygon_style_t::wedged.
Referenced by checkStyle().
|
static |
Definition at line 529 of file shapes.c.
References agxget(), checkStyle(), gvrender_set_penwidth(), gvrender_set_style(), late_double(), N_penwidth, and penwidth.
Referenced by poly_gencode(), and record_gencode().
|
static |
Definition at line 360 of file shapes.c.
References agnameof(), and agwarningf().
Referenced by poly_port(), and record_port().
|
static |
Definition at line 3973 of file shapes.c.
References agwarningf(), find_user_shape(), gv_alloc(), gv_recalloc(), Lib, N_UserShape, shape_desc::name, NULL, Shapes, streq(), UserShape, and shape_desc::usershape.
Referenced by bind_shape().
|
static |
Definition at line 1898 of file shapes.c.
References INCH2PS, late_double(), MIN_NODEHEIGHT, MIN_NODEWIDTH, N_height, and N_width.
Referenced by poly_init().
|
static |
Definition at line 36 of file shapes.c.
Referenced by poly_port(), and record_port().
|
static |
|
static |
|
static |
|
static |
Definition at line 3960 of file shapes.c.
Referenced by find_user_shape(), and user_shape().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 104 of file shapes.c.
Referenced by IS_PLAIN().
|
static |
dna construction symbols
|
static |
gene expression symbols
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 49 of file shapes.c.
Referenced by point_gencode().
|
static |
|
static |
Definition at line 3355 of file shapes.c.
Referenced by parse_reclbl(), and record_init().
|
static |
|
static |
Definition at line 290 of file shapes.c.
Referenced by bind_shape(), and user_shape().
|
static |
Definition at line 4245 of file shapes.c.
Referenced by closestSide().
|
static |
|
static |
|
static |
Definition at line 3959 of file shapes.c.
Referenced by find_user_shape(), and user_shape().