Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
shapes.c File Reference

node shapes More...

#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>
Include dependency graph for shapes.c:

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 pointfalloc_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_tparse_error (field_t *rv, char *portname)
 
static field_tparse_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_tmap_rec_port (field_t *f, char *str)
 
static void gen_fields (GVJ_t *job, node_t *n, field_t *f)
 
shape_descfind_user_shape (const char *name)
 
static shape_descuser_shape (char *name)
 
shape_descbind_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"}
 

Detailed Description

y
🡑
│ line[1]
│ ⟋
mid_y ┤ middle
│ ⟋
│line[0] x
─┼─────┬───────────🡒
static double mid_x(const pointf line[2])
X coordinate of line midpoint.
Definition shapes.c:685
static double mid_y(const pointf line[2])
Y coordinate of line midpoint.
Definition shapes.c:694

Definition in file shapes.c.

Macro Definition Documentation

◆ alpha

#define alpha   (M_PI/10.0)

Definition at line 4058 of file shapes.c.

◆ alpha2

#define alpha2   (2*alpha)

Definition at line 4059 of file shapes.c.

◆ alpha3

#define alpha3   (3*alpha)

Definition at line 4060 of file shapes.c.

◆ alpha4

#define alpha4   (2*alpha2)

Definition at line 4061 of file shapes.c.

◆ ATTR_SET

#define ATTR_SET (   a,
 
)    ((a) && (*(agxget(n,a->index)) != '\0'))

Definition at line 38 of file shapes.c.

◆ DEF_POINT

#define DEF_POINT   0.05

Definition at line 40 of file shapes.c.

◆ HASPORT

#define HASPORT   2

Definition at line 3346 of file shapes.c.

◆ HASTABLE

#define HASTABLE   4

Definition at line 3347 of file shapes.c.

◆ HASTEXT

#define HASTEXT   1

Definition at line 3345 of file shapes.c.

◆ INPORT

#define INPORT   16

Definition at line 3349 of file shapes.c.

◆ INTEXT

#define INTEXT   8

Definition at line 3348 of file shapes.c.

◆ MIN_POINT

#define MIN_POINT   0.0003

Definition at line 45 of file shapes.c.

◆ RBCONST

#define RBCONST   12

Definition at line 28 of file shapes.c.

◆ RBCURVE

#define RBCURVE   .5

Definition at line 29 of file shapes.c.

Function Documentation

◆ alloc_interpolation_points()

static pointf * alloc_interpolation_points ( pointf AF,
size_t  sides,
graphviz_polygon_style_t  style,
bool  rounded 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bind_shape()

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkStyle()

static char ** checkStyle ( node_t n,
graphviz_polygon_style_t flagp 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ closestSide()

static const char * closestSide ( node_t n,
node_t other,
port oldport 
)
static

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compassPoint()

static pointf compassPoint ( inside_t ictxt,
double  y,
double  x 
)
static

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compassPort()

static int compassPort ( node_t n,
boxf bp,
port pp,
const char *  compass,
unsigned char  sides,
inside_t ictxt 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cvtPt()

static pointf cvtPt ( pointf  p,
int  rankdir 
)
static

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

Here is the caller graph for this function:

◆ cylinder_draw()

static void cylinder_draw ( GVJ_t job,
pointf AF,
size_t  sides,
int  filled 
)
static

Definition at line 4223 of file shapes.c.

References gvrender_beziercurve(), pointf_s::x, and pointf_s::y.

Referenced by round_corners().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cylinder_size()

static pointf cylinder_size ( pointf  sz)
static

Definition at line 4177 of file shapes.c.

References pointf_s::y.

◆ cylinder_vertices()

static void cylinder_vertices ( pointf vertices,
pointf bb 
)
static

Definition at line 4183 of file shapes.c.

References pointf_s::x, and pointf_s::y.

◆ diagonals_draw()

static void diagonals_draw ( GVJ_t job,
pointf AF,
size_t  sides,
graphviz_polygon_style_t  style,
int  filled 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ epsf_gencode()

static void epsf_gencode ( GVJ_t job,
node_t n 
)
static

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.

Here is the call graph for this function:

◆ epsf_inside()

static bool epsf_inside ( inside_t inside_context,
pointf  p 
)
static

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.

Here is the call graph for this function:

◆ find_user_shape()

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findFill()

static char * findFill ( node_t n)
static

Definition at line 415 of file shapes.c.

References DEFAULT_FILL, and findFillDflt().

Referenced by poly_gencode(), and record_gencode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findFillDflt()

static char * findFillDflt ( node_t n,
char *  dflt 
)
static

Definition at line 399 of file shapes.c.

References color(), late_nnstring(), N_color, and N_fillcolor.

Referenced by findFill(), and point_gencode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_field()

static void free_field ( field_t f)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gen_fields()

static void gen_fields ( GVJ_t job,
node_t n,
field_t f 
)
static

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ invflip_angle()

static double invflip_angle ( double  angle,
int  rankdir 
)
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().

Here is the caller graph for this function:

◆ invflip_side()

static unsigned char invflip_side ( unsigned char  side,
int  rankdir 
)
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().

Here is the caller graph for this function:

◆ IS_BOX()

static bool IS_BOX ( node_t n)
static

Definition at line 203 of file shapes.c.

References ND_shape, and p_box.

Referenced by poly_port().

Here is the caller graph for this function:

◆ IS_PLAIN()

static bool IS_PLAIN ( node_t n)
static

Definition at line 207 of file shapes.c.

References ND_shape, and p_plain.

Referenced by poly_init().

Here is the caller graph for this function:

◆ isBox()

static bool isBox ( node_t n)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ISCTRL()

static bool ISCTRL ( int  c)
static

Definition at line 3351 of file shapes.c.

Referenced by parse_reclbl().

Here is the caller graph for this function:

◆ isEllipse()

static bool isEllipse ( node_t n)
static

Definition at line 430 of file shapes.c.

References ND_shape, and polygon_t::sides.

Referenced by checkStyle().

Here is the caller graph for this function:

◆ isPolygon()

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ map_rec_port()

static field_t * map_rec_port ( field_t f,
char *  str 
)
static

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mcircle_hack()

static void Mcircle_hack ( GVJ_t job,
node_t n 
)
static

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mid_x()

static double mid_x ( const pointf  line[2])
static
Parameters
linetwo points
Returns
X coordinate of midpoint

Definition at line 685 of file shapes.c.

Referenced by round_corners().

Here is the caller graph for this function:

◆ mid_y()

static double mid_y ( const pointf  line[2])
static
Parameters
linetwo points
Returns
Y coordinate of midpoint

Definition at line 694 of file shapes.c.

Referenced by round_corners().

Here is the caller graph for this function:

◆ multicolor()

static bool multicolor ( const char *  f)
static

Definition at line 2915 of file shapes.c.

References NULL.

Referenced by poly_gencode().

Here is the caller graph for this function:

◆ parse_error()

static field_t * parse_error ( field_t rv,
char *  portname 
)
static

Definition at line 3374 of file shapes.c.

References free(), free_field(), and NULL.

Referenced by parse_reclbl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_reclbl()

static field_t * parse_reclbl ( node_t n,
bool  LR,
bool  flag,
char *  text 
)
static

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ penColor()

static char * penColor ( GVJ_t job,
node_t n 
)
static

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ point_gencode()

◆ point_init()

static void point_init ( node_t n)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ point_inside()

static bool point_inside ( inside_t inside_context,
pointf  p 
)
static

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.

Here is the call graph for this function:

◆ poly_free()

static void poly_free ( node_t n)
static

Definition at line 2383 of file shapes.c.

References free(), ND_shape_info, and polygon_t::vertices.

Here is the call graph for this function:

◆ poly_gencode()

static void poly_gencode ( GVJ_t job,
node_t n 
)
static

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.

Here is the call graph for this function:

◆ poly_init()

static void poly_init ( node_t n)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ poly_inside()

◆ poly_path()

static int poly_path ( node_t n,
port p,
int  side,
boxf  rv[],
int *  kptr 
)
static

Definition at line 2535 of file shapes.c.

◆ poly_port()

static port poly_port ( node_t n,
char *  portname,
char *  compass 
)
static

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

Here is the call graph for this function:

◆ pos_reclbl()

static void pos_reclbl ( field_t f,
pointf  ul,
unsigned char  sides 
)
static

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ quant()

static double quant ( double  val,
double  q 
)
static

Definition at line 365 of file shapes.c.

Referenced by poly_init().

Here is the caller graph for this function:

◆ record_free()

static void record_free ( node_t n)
static

Definition at line 3733 of file shapes.c.

References free_field(), and ND_shape_info.

Here is the call graph for this function:

◆ record_gencode()

◆ record_init()

static void record_init ( node_t n)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ record_inside()

static bool record_inside ( inside_t inside_context,
pointf  p 
)
static

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.

Here is the call graph for this function:

◆ record_path()

static int record_path ( node_t n,
port p,
int  side,
boxf  rv[],
int *  kptr 
)
static

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.

Here is the call graph for this function:

◆ record_port()

static port record_port ( node_t n,
char *  portname,
char *  compass 
)
static

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

Here is the call graph for this function:

◆ resize_reclbl()

static void resize_reclbl ( field_t f,
pointf  sz,
bool  nojustify_p 
)
static

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolvePort()

port resolvePort ( node_t n,
node_t other,
port oldport 
)

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

Here is the call graph for this function:
Here is the caller graph for this function:

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ round_corners()

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rounded_draw()

static void rounded_draw ( GVJ_t job,
pointf AF,
size_t  sides,
graphviz_polygon_style_t  style,
int  filled 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ same_side()

static int same_side ( pointf  p0,
pointf  p1,
pointf  L0,
pointf  L1 
)
static

Definition at line 371 of file shapes.c.

References s1(), pointf_s::x, and pointf_s::y.

Referenced by poly_inside(), and star_inside().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shapeOf()

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ size_reclbl()

static pointf size_reclbl ( node_t n,
field_t f 
)
static

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SPECIAL_CORNERS()

static bool SPECIAL_CORNERS ( graphviz_polygon_style_t  style)
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().

Here is the caller graph for this function:

◆ star_inside()

static bool star_inside ( inside_t inside_context,
pointf  p 
)
static

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.

Here is the call graph for this function:

◆ star_size()

static pointf star_size ( pointf  sz0)
static

Definition at line 4063 of file shapes.c.

References alpha, alpha2, alpha3, alpha4, pointf_s::x, and pointf_s::y.

◆ star_vertices()

static void star_vertices ( pointf vertices,
pointf bb 
)
static

Definition at line 4078 of file shapes.c.

References alpha, alpha2, alpha3, alpha4, offset, pointf_s::x, and pointf_s::y.

◆ style_or()

◆ stylenode()

static graphviz_polygon_style_t stylenode ( GVJ_t job,
node_t n 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unrecognized()

static void unrecognized ( node_t n,
char *  p 
)
static

Definition at line 360 of file shapes.c.

References agnameof(), and agwarningf().

Referenced by poly_port(), and record_port().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ user_shape()

static shape_desc * user_shape ( char *  name)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ userSize()

static double userSize ( node_t n)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ Center

port Center = {.theta = -1, .clip = true}
static

Definition at line 36 of file shapes.c.

Referenced by poly_port(), and record_port().

◆ cylinder_fns

shape_functions cylinder_fns
static
Initial value:
= {
}
static bool poly_inside(inside_t *inside_context, pointf p)
Definition shapes.c:2399
static void poly_gencode(GVJ_t *job, node_t *n)
Definition shapes.c:2920
static int poly_path(node_t *n, port *p, int side, boxf rv[], int *kptr)
Definition shapes.c:2535
static void poly_init(node_t *n)
Definition shapes.c:1931
static void poly_free(node_t *n)
Definition shapes.c:2383
static port poly_port(node_t *n, char *portname, char *)
Definition shapes.c:2878

Definition at line 281 of file shapes.c.

◆ cylinder_gen

poly_desc_t cylinder_gen
static
Initial value:
= {
}
static pointf cylinder_size(pointf)
Definition shapes.c:4177
static void cylinder_vertices(pointf *, pointf *)
Definition shapes.c:4183

Definition at line 86 of file shapes.c.

◆ epsf_fns

shape_functions epsf_fns
static
Initial value:
= {
}
node NULL
Definition grammar.y:163
void epsf_free(node_t *n)
void epsf_init(node_t *n)
Definition psusershape.c:97
static bool epsf_inside(inside_t *inside_context, pointf p)
Definition shapes.c:4016
static void epsf_gencode(GVJ_t *job, node_t *n)
Definition shapes.c:4027

Definition at line 265 of file shapes.c.

◆ N_UserShape

size_t N_UserShape
static

Definition at line 3960 of file shapes.c.

Referenced by find_user_shape(), and user_shape().

◆ p_assembly

polygon_t p_assembly
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = ASSEMBLY}}
@ ASSEMBLY
Definition const.h:216

Definition at line 190 of file shapes.c.

◆ p_box

polygon_t p_box = {.peripheries = 1, .sides = 4}
static

Definition at line 101 of file shapes.c.

Referenced by IS_BOX().

◆ p_box3d

polygon_t p_box3d
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = BOX3D}}
@ BOX3D
Definition const.h:205

Definition at line 119 of file shapes.c.

◆ p_cds

polygon_t p_cds
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = CDS}}
@ CDS
Definition const.h:208

Definition at line 163 of file shapes.c.

◆ p_circle

polygon_t p_circle = {.regular = true, .peripheries = 1, .sides = 1}
static

Definition at line 98 of file shapes.c.

◆ p_component

polygon_t p_component
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = COMPONENT}}
@ COMPONENT
Definition const.h:206

Definition at line 121 of file shapes.c.

◆ p_cylinder

polygon_t p_cylinder
static
Initial value:
= {.peripheries = 1,
.sides = 19,
.option = {.shape = CYLINDER},
.vertices = (pointf *)&cylinder_gen}
@ CYLINDER
Definition const.h:227
static poly_desc_t cylinder_gen
Definition shapes.c:86

Definition at line 125 of file shapes.c.

◆ p_diamond

polygon_t p_diamond = {.peripheries = 1, .sides = 4, .orientation = 45.0}
static

Definition at line 105 of file shapes.c.

◆ p_doublecircle

polygon_t p_doublecircle
static
Initial value:
= {
.regular = true, .peripheries = 2, .sides = 1}

Definition at line 131 of file shapes.c.

◆ p_doubleoctagon

polygon_t p_doubleoctagon = {.peripheries = 2, .sides = 8}
static

Definition at line 139 of file shapes.c.

◆ p_egg

polygon_t p_egg = {.peripheries = 1, .sides = 1, .distortion = -0.3}
static

Definition at line 99 of file shapes.c.

◆ p_ellipse

polygon_t p_ellipse = {.peripheries = 1, .sides = 1}
static

Definition at line 97 of file shapes.c.

◆ p_fivepoverhang

polygon_t p_fivepoverhang
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = FIVEPOVERHANG}}
@ FIVEPOVERHANG
Definition const.h:213

Definition at line 184 of file shapes.c.

◆ p_folder

polygon_t p_folder
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = FOLDER}}
@ FOLDER
Definition const.h:204

Definition at line 117 of file shapes.c.

◆ p_hexagon

polygon_t p_hexagon = {.peripheries = 1, .sides = 6}
static

Definition at line 110 of file shapes.c.

◆ p_house

polygon_t p_house = {.peripheries = 1, .sides = 5, .distortion = -0.64}
static

Definition at line 108 of file shapes.c.

◆ p_insulator

polygon_t p_insulator
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = INSULATOR}}
@ INSULATOR
Definition const.h:218

Definition at line 169 of file shapes.c.

◆ p_invhouse

polygon_t p_invhouse
static
Initial value:
= {
.peripheries = 1, .sides = 5, .orientation = 180.0, .distortion = -0.64}

Definition at line 137 of file shapes.c.

◆ p_invtrapezium

polygon_t p_invtrapezium
static
Initial value:
= {
.peripheries = 1, .sides = 4, .orientation = 180.0, .distortion = -0.4}

Definition at line 135 of file shapes.c.

◆ p_invtriangle

polygon_t p_invtriangle
static
Initial value:
= {
.peripheries = 1, .sides = 3, .orientation = 180.0}

Definition at line 133 of file shapes.c.

◆ p_larrow

polygon_t p_larrow
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = LARROW}}
@ LARROW
Definition const.h:225

Definition at line 198 of file shapes.c.

◆ p_lpromoter

polygon_t p_lpromoter
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = LPROMOTER}}
@ LPROMOTER
Definition const.h:226

Definition at line 200 of file shapes.c.

◆ p_Mcircle

polygon_t p_Mcircle
static
Initial value:
= {.regular = true,
.peripheries = 1,
.sides = 1,
.option = {.diagonals = true, .auxlabels = true}}

Definition at line 150 of file shapes.c.

◆ p_Mdiamond

polygon_t p_Mdiamond
static
Initial value:
= {
.peripheries = 1,
.sides = 4,
.orientation = 45.0,
.option = {.diagonals = true, .auxlabels = true}}

Definition at line 141 of file shapes.c.

◆ p_Msquare

polygon_t p_Msquare
static
Initial value:
= {.regular = true,
.peripheries = 1,
.sides = 4,
.option = {.diagonals = true}}

Definition at line 146 of file shapes.c.

◆ p_note

polygon_t p_note
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = DOGEAR}}
@ DOGEAR
Definition const.h:202

Definition at line 113 of file shapes.c.

◆ p_noverhang

polygon_t p_noverhang
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = NOVERHANG}}
@ NOVERHANG
Definition const.h:215

Definition at line 188 of file shapes.c.

◆ p_octagon

polygon_t p_octagon = {.peripheries = 1, .sides = 8}
static

Definition at line 112 of file shapes.c.

◆ p_parallelogram

polygon_t p_parallelogram = {.peripheries = 1, .sides = 4, .skew = 0.6}
static

Definition at line 107 of file shapes.c.

◆ p_pentagon

polygon_t p_pentagon = {.peripheries = 1, .sides = 5}
static

Definition at line 109 of file shapes.c.

◆ p_plain

polygon_t p_plain = {.sides = 4}
static

Definition at line 104 of file shapes.c.

Referenced by IS_PLAIN().

◆ p_plaintext

polygon_t p_plaintext = {.sides = 4}
static

Definition at line 103 of file shapes.c.

◆ p_polygon

polygon_t p_polygon = {.peripheries = 1}
static

Definition at line 94 of file shapes.c.

◆ p_primersite

polygon_t p_primersite
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = PRIMERSITE}}
@ PRIMERSITE
Definition const.h:211

dna construction symbols

Definition at line 180 of file shapes.c.

◆ p_promoter

polygon_t p_promoter
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = PROMOTER}}
@ PROMOTER
Definition const.h:207

gene expression symbols

Definition at line 161 of file shapes.c.

◆ p_proteasesite

polygon_t p_proteasesite
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = PROTEASESITE}}
@ PROTEASESITE
Definition const.h:221

Definition at line 175 of file shapes.c.

◆ p_proteinstab

polygon_t p_proteinstab
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = PROTEINSTAB}}
@ PROTEINSTAB
Definition const.h:222

Definition at line 177 of file shapes.c.

◆ p_rarrow

polygon_t p_rarrow
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = RARROW}}
@ RARROW
Definition const.h:224

Definition at line 196 of file shapes.c.

◆ p_restrictionsite

polygon_t p_restrictionsite
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = RESTRICTIONSITE}}
@ RESTRICTIONSITE
Definition const.h:212

Definition at line 182 of file shapes.c.

◆ p_ribosite

polygon_t p_ribosite
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = RIBOSITE}}
@ RIBOSITE
Definition const.h:219

Definition at line 171 of file shapes.c.

◆ p_rnastab

polygon_t p_rnastab
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = RNASTAB}}
@ RNASTAB
Definition const.h:220

Definition at line 173 of file shapes.c.

◆ p_rpromoter

polygon_t p_rpromoter
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = RPROMOTER}}
@ RPROMOTER
Definition const.h:223

Definition at line 194 of file shapes.c.

◆ p_septagon

polygon_t p_septagon = {.peripheries = 1, .sides = 7}
static

Definition at line 111 of file shapes.c.

◆ p_signature

polygon_t p_signature
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = SIGNATURE}}
@ SIGNATURE
Definition const.h:217

Definition at line 192 of file shapes.c.

◆ p_square

polygon_t p_square = {.regular = true, .peripheries = 1, .sides = 4}
static

Definition at line 102 of file shapes.c.

◆ p_star

polygon_t p_star
static
Initial value:
= {
.peripheries = 1, .sides = 10, .vertices = (pointf *)&star_gen}
static poly_desc_t star_gen
Definition shapes.c:78

Definition at line 156 of file shapes.c.

◆ p_tab

polygon_t p_tab
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = TAB}}
@ TAB
Definition const.h:203

Definition at line 115 of file shapes.c.

◆ p_terminator

polygon_t p_terminator
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = TERMINATOR}}
@ TERMINATOR
Definition const.h:209

Definition at line 165 of file shapes.c.

◆ p_threepoverhang

polygon_t p_threepoverhang
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = THREEPOVERHANG}}
@ THREEPOVERHANG
Definition const.h:214

Definition at line 186 of file shapes.c.

◆ p_trapezium

polygon_t p_trapezium = {.peripheries = 1, .sides = 4, .distortion = -0.4}
static

Definition at line 106 of file shapes.c.

◆ p_triangle

polygon_t p_triangle = {.peripheries = 1, .sides = 3}
static

Definition at line 100 of file shapes.c.

◆ p_tripleoctagon

polygon_t p_tripleoctagon = {.peripheries = 3, .sides = 8}
static

Definition at line 140 of file shapes.c.

◆ p_underline

polygon_t p_underline
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.underline = true}}

Definition at line 123 of file shapes.c.

◆ p_utr

polygon_t p_utr
static
Initial value:
= {
.peripheries = 1, .sides = 4, .option = {.shape = UTR}}
@ UTR
Definition const.h:210

Definition at line 167 of file shapes.c.

◆ point_fns

shape_functions point_fns
static
Initial value:
= {
}
static bool point_inside(inside_t *inside_context, pointf p)
Definition shapes.c:3216
static void point_init(node_t *n)
Definition shapes.c:3125
static void point_gencode(GVJ_t *job, node_t *n)
Definition shapes.c:3257

Definition at line 249 of file shapes.c.

◆ point_style

char* point_style[3] = { "invis\0", "filled\0", 0 }
static

Definition at line 49 of file shapes.c.

Referenced by point_gencode().

◆ poly_fns

shape_functions poly_fns
static
Initial value:

Definition at line 241 of file shapes.c.

◆ reclblp

char* reclblp
static

Definition at line 3355 of file shapes.c.

Referenced by parse_reclbl(), and record_init().

◆ record_fns

shape_functions record_fns
static
Initial value:
= {
}
static void record_init(node_t *n)
Definition shapes.c:3687
static void record_gencode(GVJ_t *job, node_t *n)
Definition shapes.c:3886
static int record_path(node_t *n, port *p, int side, boxf rv[], int *kptr)
Definition shapes.c:3817
static bool record_inside(inside_t *inside_context, pointf p)
Definition shapes.c:3786
static port record_port(node_t *n, char *portname, char *)
Definition shapes.c:3756
static void record_free(node_t *n)
Definition shapes.c:3733

Definition at line 257 of file shapes.c.

◆ Shapes

shape_desc Shapes[]
static

Definition at line 290 of file shapes.c.

Referenced by bind_shape(), and user_shape().

◆ side_port

const char* side_port[] = {"s", "e", "n", "w"}
static

Definition at line 4245 of file shapes.c.

Referenced by closestSide().

◆ star_fns

shape_functions star_fns
static
Initial value:
= {
}
static bool star_inside(inside_t *inside_context, pointf p)
Definition shapes.c:4113

Definition at line 273 of file shapes.c.

◆ star_gen

poly_desc_t star_gen
static
Initial value:
= {
}
static pointf star_size(pointf)
Definition shapes.c:4063
static void star_vertices(pointf *, pointf *)
Definition shapes.c:4078

Definition at line 78 of file shapes.c.

◆ UserShape

shape_desc** UserShape
static

Definition at line 3959 of file shapes.c.

Referenced by find_user_shape(), and user_shape().