Graphviz 13.1.3~dev.20250829.0113
|
#include "config.h"
#include "../tcl-compat.h"
#include <sys/types.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <limits.h>
#include "makecw.h"
#include <math.h>
#include <pathplan/pathutil.h>
#include <pathplan/vispath.h>
#include <pathplan/tri.h>
#include "Plegal_arrangement.h"
#include <tcl.h>
#include <util/agxbuf.h>
#include <util/alloc.h>
#include <util/itos.h>
#include <util/list.h>
#include <util/prisize_t.h>
Go to the source code of this file.
Data Structures | |
struct | poly_s |
struct | vgpane_t |
Macros | |
#define | Tcl_GetStringResult(interp) interp->result |
#define | HANDLE_FORMAT ("vgpane%" PRISIZE_T) |
printf format for TCL handles | |
Typedefs | |
typedef Ppoint_t | point |
typedef struct poly_s | poly |
Functions | |
typedef | LIST (vgpane_t) |
static void | vc_stale (vgpane_t *vgp) |
static int | vc_refresh (vgpane_t *vgp) |
static void | dgsprintxy (agxbuf *result, int npts, const point p[]) |
static void | expandPercentsEval (Tcl_Interp *interp, char *before, size_t vgcanvasHandle, int npts, const point *ppos) |
static void | triangle_callback (void *vgparg, const point pqr[]) |
static char * | buildBindings (char *s1, const char *s2) |
static int | scanpoint (Tcl_Interp *interp, const char *argv[], point *p) |
static point | center (point vertex[], size_t n) |
static double | distance (point p, point q) |
static point | rotate (point c, point p, double alpha) |
static point | scale (point c, point p, double gain) |
static bool | remove_poly (vgpane_t *vgp, int id) |
static int | insert_poly (Tcl_Interp *interp, vgpane_t *vgp, int id, const char *vargv[], Tcl_Size vargc) |
static void | make_barriers (vgpane_t *vgp, int pp, int qp, Pedge_t **barriers, size_t *n_barriers) |
static void | appendpoint (Tcl_Interp *interp, point p) |
static vgpane_t * | find_vgpane (vgpanes_t *panes, const char *handle) |
static void | garbage_collect_vgpanes (vgpanes_t *panes) |
static int | vgpanecmd (ClientData clientData, Tcl_Interp *interp, int argc, const char *argv[]) |
static int | vgpane (ClientData clientData, Tcl_Interp *interp, int argc, const char *argv[]) |
int | Tclpathplan_Init (Tcl_Interp *interp) |
int | Tclpathplan_SafeInit (Tcl_Interp *interp) |
#define HANDLE_FORMAT ("vgpane%" PRISIZE_T) |
Definition at line 57 of file tclpathplan.c.
#define Tcl_GetStringResult | ( | interp | ) | interp->result |
Definition at line 45 of file tclpathplan.c.
Definition at line 49 of file tclpathplan.c.
|
static |
Definition at line 348 of file tclpathplan.c.
References point::x, and point::y.
Referenced by vgpanecmd().
|
static |
Definition at line 180 of file tclpathplan.c.
References agxbdisown(), agxbprint(), free(), gv_strdup(), NULL, and s1().
Referenced by vgpanecmd().
Definition at line 238 of file tclpathplan.c.
References point::x, and point::y.
Referenced by check_or_realloc_arrays(), circleLayout(), distance_to_group(), draw_polygon(), findCenterNode(), genBox(), genPoly(), get_gradient_points(), get_tri(), glcreate_gl_topview_menu(), LIST(), node_distinct_coloring_internal2(), pcp_rotate(), placeFixed(), polyGraphs(), QuadTree_get_quadrant(), QuadTree_get_supernodes(), QuadTree_get_supernodes_internal(), QuadTree_new(), QuadTree_new_from_point_list(), QuadTree_new_in_quadrant(), rotate(), setParentNodes(), setPositions(), setSubtreeSpans(), spring_electrical_embedding(), spring_electrical_spring_embedding(), vgpanecmd(), and walkTree().
Definition at line 105 of file tclpathplan.c.
References agxblen(), agxbprint(), and agxbputc().
Referenced by expandPercentsEval().
|
static |
interp | Interpreter context |
before | Command with percent expressions |
vgcanvasHandle | Index to use in "%r" substitution |
npts | Number of coordinates |
ppos | Coordinates to substitute for t |
Definition at line 126 of file tclpathplan.c.
References agxbfree(), agxbprint(), agxbput_n(), agxbputc(), agxbuse(), dgsprintxy(), HANDLE_FORMAT, NULL, and Tcl_GetStringResult.
Referenced by triangle_callback().
|
static |
lookup an existing pane
panes | Collection to search |
handle | Text descriptor of the pane |
NULL
if there is no such pane Definition at line 363 of file tclpathplan.c.
References HANDLE_FORMAT, LIST_AT, LIST_SIZE, and NULL.
Referenced by vgpanecmd().
|
static |
cleanup unused panes where possible
Panes need to have a stable identifier (index) for their lifetime. Thus they cannot be removed from a vgpanes_t
when deallocated because removing them would alter the index of any still-live panes that comes after them. Instead, panes are marked ->valid = false
when deallocated and then later removed here.
It is only safe to remove deallocated panes that have no live panes following them, which is exactly what this function does.
panes | Collection to sweep |
Definition at line 394 of file tclpathplan.c.
References LIST_BACK, LIST_FREE, LIST_IS_EMPTY, LIST_POP_BACK, and NULL.
Referenced by vgpanecmd().
|
static |
Definition at line 298 of file tclpathplan.c.
References poly_s::boundary, make_CW(), Ppoly_t::pn, Ppoly_t::ps, scanpoint(), Tcl_Size, and vc_stale().
Referenced by vgpanecmd().
typedef LIST | ( | vgpane_t | ) |
Definition at line 68 of file tclpathplan.c.
References poly_s::boundary, gv_calloc(), LIST_APPEND, LIST_BACK, Ppoly_t::pn, and Ppoly_t::ps.
|
static |
Definition at line 315 of file tclpathplan.c.
References Pedge_t::a, Pedge_t::b, gv_calloc(), LIST_GET, and LIST_SIZE.
Referenced by vgpanecmd().
|
static |
Definition at line 283 of file tclpathplan.c.
References free(), id, LIST_GET, LIST_POP_BACK, LIST_SET, LIST_SIZE, and vc_stale().
Referenced by vgpanecmd().
Definition at line 260 of file tclpathplan.c.
References alpha, distance(), point::x, and point::y.
Referenced by vgpanecmd().
Definition at line 274 of file tclpathplan.c.
References point::x, and point::y.
Referenced by vgpanecmd().
|
static |
Definition at line 225 of file tclpathplan.c.
References NULL, point::x, and point::y.
Referenced by insert_poly(), and vgpanecmd().
int Tclpathplan_Init | ( | Tcl_Interp * | interp | ) |
Definition at line 925 of file tclpathplan.c.
References NULL, and vgpane().
Referenced by Tclpathplan_SafeInit().
int Tclpathplan_SafeInit | ( | Tcl_Interp * | interp | ) |
Definition at line 955 of file tclpathplan.c.
References Tclpathplan_Init().
|
static |
Definition at line 172 of file tclpathplan.c.
References expandPercentsEval().
Referenced by vgpanecmd().
|
static |
Definition at line 90 of file tclpathplan.c.
References free(), gv_calloc(), LIST_AT, LIST_SIZE, NULL, Plegal_arrangement(), and Pobsopen().
Referenced by vgpanecmd().
|
static |
Definition at line 82 of file tclpathplan.c.
References NULL, and Pobsclose().
Referenced by insert_poly(), and remove_poly().
|
static |
Definition at line 902 of file tclpathplan.c.
References agxbfree(), agxbprint(), agxbuse(), HANDLE_FORMAT, LIST_APPEND, LIST_BACK, LIST_SIZE, NULL, and vgpanecmd().
Referenced by Tclpathplan_Init().
|
static |
Definition at line 412 of file tclpathplan.c.
References alpha, appendpoint(), poly_s::boundary, buildBindings(), center(), find_vgpane(), free(), garbage_collect_vgpanes(), in_poly(), insert_poly(), ITOS, LIST_AT, LIST_FREE, LIST_GET, LIST_SIZE, make_barriers(), NULL, Ppoly_t::pn, Pobsclose(), Pobspath(), POLYID_NONE, POLYID_UNKNOWN, Proutespline(), ps, Ppoly_t::ps, Ptriangulate(), remove_poly(), rotate(), scale(), scanpoint(), Tcl_Size, triangle_callback(), vc_refresh(), point::x, Pxy_t::x, point::y, and Pxy_t::y.
Referenced by vgpane().