Graphviz 13.0.0~dev.20241220.2304
|
#include <assert.h>
#include "topviewfuncs.h"
#include <cgraph/cgraph.h>
#include "smyrna_utils.h"
#include <common/colorprocs.h>
#include "draw.h"
#include "frmobjectui.h"
#include <xdot/xdot.h>
#include <glcomp/glutils.h>
#include "selectionfuncs.h"
#include <common/types.h>
#include <common/utils.h>
#include <limits.h>
#include <float.h>
#include <math.h>
#include <stdbool.h>
#include <stdlib.h>
#include <util/alloc.h>
#include <util/gv_ctype.h>
Go to the source code of this file.
Typedefs | |
typedef void(* | edgefn) (Agraph_t *, Agedge_t *, glCompColor) |
Functions | |
static xdot * | parseXdotwithattrs (void *e) |
static void | set_boundaries (Agraph_t *g) |
static void | draw_xdot (xdot *x, double base_z) |
static glCompPoint | getEdgeHead (Agedge_t *edge) |
static glCompPoint | getEdgeTail (Agedge_t *edge) |
static float | getEdgeLength (Agedge_t *edge) |
static void | glCompColorxlate (glCompColor *c, const char *str) |
static int | visible (Agsym_t *attr, void *obj) |
static int | object_color (void *obj, glCompColor *c) |
static void | draw_edge (glCompPoint *posT, glCompPoint *posH, float length, int deg) |
static char * | labelOf (Agraph_t *g, Agnode_t *v) |
static void | renderSelectedNodes (Agraph_t *g) |
static void | renderNodes (Agraph_t *g) |
static void | renderSelectedEdges (Agraph_t *g) |
static char * | skipWS (char *p) |
static char * | skipNWS (char *p) |
static char * | readPoint (char *p, xdot_point *pt) |
static char * | countPoints (char *pos, int *have_sp, xdot_point *sp, int *have_ep, xdot_point *ep, size_t *cntp) |
static int | storePoints (char *pos, xdot_point *ps) |
static xdot * | makeXDotSpline (char *pos) |
static void | renderEdgesFn (Agraph_t *g, edgefn ef, int skipSelected) |
static void | edge_xdot (Agraph_t *g, Agedge_t *e, glCompColor c) |
static void | edge_seg (Agraph_t *g, Agedge_t *e, glCompColor c) |
static void | edge_spline (Agraph_t *g, Agedge_t *e, glCompColor c) |
static void | renderEdges (Agraph_t *g) |
static void | renderNodeLabels (Agraph_t *g) |
static void | renderEdgeLabels (Agraph_t *g) |
static void | cacheNodes (Agraph_t *g, topview *t) |
static void | cacheEdges (Agraph_t *g, topview *t) |
void | cacheSelectedEdges (Agraph_t *g, topview *t) |
void | cacheSelectedNodes (Agraph_t *g, topview *t) |
static void | cacheNodeLabels (Agraph_t *g, topview *t) |
static void | cacheEdgeLabels (Agraph_t *g, topview *t) |
void | updateSmGraph (Agraph_t *g, topview *t) |
void | initSmGraph (Agraph_t *g, topview *rv) |
void | renderSmGraph (topview *t) |
typedef void(* edgefn) (Agraph_t *, Agedge_t *, glCompColor) |
Definition at line 602 of file topviewfuncs.c.
Definition at line 802 of file topviewfuncs.c.
References topview::cache, topviewcache::edgelabel_id, and renderEdgeLabels().
Referenced by updateSmGraph().
Definition at line 762 of file topviewfuncs.c.
References topview::cache, topviewcache::edge_id, and renderEdges().
Referenced by updateSmGraph().
Definition at line 793 of file topviewfuncs.c.
References topview::cache, topviewcache::nodelabel_id, and renderNodeLabels().
Referenced by updateSmGraph().
Definition at line 749 of file topviewfuncs.c.
References topview::cache, topviewcache::node_id, and renderNodes().
Referenced by updateSmGraph().
Definition at line 773 of file topviewfuncs.c.
References topview::cache, renderSelectedEdges(), and topviewcache::seledge_id.
Referenced by deselect_all(), pick_object_xyz(), pick_objects_rect(), and updateSmGraph().
Definition at line 784 of file topviewfuncs.c.
References topview::cache, renderSelectedNodes(), and topviewcache::selnode_id.
Referenced by deselect_all(), pick_object_xyz(), pick_objects_rect(), select_polygon(), and updateSmGraph().
|
static |
Definition at line 494 of file topviewfuncs.c.
References cnt(), readPoint(), skipNWS(), and skipWS().
Referenced by makeXDotSpline().
|
static |
Definition at line 199 of file topviewfuncs.c.
References alpha, DEG2RAD, glCompPoint::x, glCompPoint::y, and glCompPoint::z.
Referenced by edge_seg(), and renderSelectedEdges().
|
static |
Definition at line 75 of file topviewfuncs.c.
References xdot::cnt, _xdot_op::drawfunc, topview::global_z, sdot_op::op, xdot::ops, _ViewInfo::Topview, and view.
Referenced by edge_spline(), edge_xdot(), renderNodes(), renderSelectedEdges(), and renderSelectedNodes().
|
static |
Definition at line 640 of file topviewfuncs.c.
References glCompColor::A, aghead, agtail, agxget(), glCompColor::B, draw_edge(), ED_posHead, ED_posTail, glCompColor::G, getEdgeLength(), getPointFromStr(), GN_pos, and glCompColor::R.
Referenced by renderEdges().
|
static |
Definition at line 654 of file topviewfuncs.c.
References glCompColor::A, agxget(), glCompColor::B, draw_xdot(), freeXDot(), glCompColor::G, GE_pos, makeXDotSpline(), and glCompColor::R.
Referenced by renderEdges().
|
static |
Definition at line 628 of file topviewfuncs.c.
References draw_xdot(), freeXDot(), and parseXdotwithattrs().
Referenced by renderEdges().
|
static |
Definition at line 95 of file topviewfuncs.c.
References agget(), aghead, edge, and getPointFromStr().
Referenced by getEdgeLength().
|
static |
Definition at line 104 of file topviewfuncs.c.
References A, B, edge, getEdgeHead(), and getEdgeTail().
Referenced by edge_seg(), object_color(), renderSelectedEdges(), and updateSmGraph().
|
static |
Definition at line 99 of file topviewfuncs.c.
References agget(), agtail, edge, and getPointFromStr().
Referenced by getEdgeLength().
|
static |
Definition at line 113 of file topviewfuncs.c.
References glCompColor::A, glCompColor::B, colorxlate(), glCompColor::G, glCompColor::R, color_s::RGBA, RGBA_DOUBLE, str, and color_s::u.
Referenced by renderEdgeLabels(), renderNodeLabels(), and renderSelectedNodes().
Definition at line 858 of file topviewfuncs.c.
References topview::active, _ViewInfo::activeGraph, topview::attributes, topview::cache, topviewcache::edge_id, topview::fisheyeParams, _ViewInfo::g, topview::h, load_attr_list(), topviewcache::node_id, NULL, topview::sel, _selection::selectEdges, _selection::selectNodes, topviewcache::seledge_id, topviewcache::selnode_id, updateSmGraph(), and view.
Referenced by refreshViewport().
Definition at line 233 of file topviewfuncs.c.
References agget(), agnameof(), agxget(), GG_labelattribute, and GN_labelattribute.
Referenced by renderSelectedNodes().
|
static |
Definition at line 558 of file topviewfuncs.c.
References _xdot_op::bezier, cnt(), xdot_polyline::cnt, countPoints(), _xdot_op::drawfunc, free(), gv_alloc(), gv_calloc(), _xdot_op::kind, NULL, OpFns, xdot_polyline::pts, storePoints(), _xdot_op::u, xd, xd_unfilled_bezier, and xop_bezier.
Referenced by edge_spline().
|
static |
Definition at line 137 of file topviewfuncs.c.
References glCompColor::A, _ViewInfo::activeGraph, AGEDGE, agget(), AGNODE, agraphof(), AGTYPE, glCompColor::B, colorxlate(), _ViewInfo::colschms, free(), _ViewInfo::g, glCompColor::G, GE_visible, getAttrFloat(), getAttrStr(), getcolorfromschema(), getEdgeLength(), GN_visible, topview::maxedgelen, NULL, glCompColor::R, color_s::RGBA, RGBA_DOUBLE, setColorScheme(), _ViewInfo::Topview, color_s::u, view, and visible().
Referenced by renderEdgesFn(), renderNodes(), and renderSelectedEdges().
|
static |
Definition at line 31 of file topviewfuncs.c.
References agget(), agobjkind(), AGRAPH, cnt(), xdot::cnt, NULL, OpFns, xdot::ops, and parseXDotFOn().
Referenced by edge_xdot(), renderNodes(), renderSelectedEdges(), and renderSelectedNodes().
|
static |
Definition at line 455 of file topviewfuncs.c.
References xdot_point::x, xdot_point::y, and xdot_point::z.
Referenced by countPoints(), and storePoints().
|
static |
Definition at line 710 of file topviewfuncs.c.
References glCompColor::A, agfstnode(), agfstout(), agnxtnode(), agnxtout(), agxget(), glCompColor::B, ED_posHead, ED_posTail, glCompColor::G, GE_labelattribute, GG_edgelabelcolor, glCompColorxlate(), glprintfglut(), _ViewInfo::glutfont, ND_visible, glCompColor::R, view, glCompPoint::x, glCompPoint::y, glCompPoint::z, and z.
Referenced by cacheEdgeLabels().
|
static |
Definition at line 667 of file topviewfuncs.c.
References _ViewInfo::drawSplines, edge_seg(), edge_spline(), edge_xdot(), GE_pos, renderEdgesFn(), and view.
Referenced by cacheEdges().
Definition at line 604 of file topviewfuncs.c.
References agfstnode(), agfstout(), aghead, agnxtnode(), agnxtout(), agtail, ED_selected, ND_visible, and object_color().
Referenced by renderEdges().
|
static |
Definition at line 684 of file topviewfuncs.c.
References glCompColor::A, agfstnode(), agnameof(), agnxtnode(), agxget(), glCompColor::B, glCompColor::G, GG_nodelabelcolor, glCompColorxlate(), glprintfglut(), _ViewInfo::glutfont, GN_labelattribute, ND_A, ND_selected, ND_visible, glCompColor::R, view, glCompPoint::x, glCompPoint::y, and glCompPoint::z.
Referenced by cacheNodeLabels().
|
static |
Definition at line 308 of file topviewfuncs.c.
References glCompColor::A, agfstnode(), agnxtnode(), agxget(), glCompColor::B, draw_xdot(), drawCircle(), freeXDot(), glCompColor::G, getAttrInt(), getPointFromStr(), GN_pos, GN_selected, GN_size, l_float(), l_int(), ND_A, ND_selected, ND_size, ND_TVref, ND_visible, _ViewInfo::nodeScale, object_color(), parseXdotwithattrs(), glCompColor::R, view, glCompPoint::x, glCompPoint::y, and glCompPoint::z.
Referenced by cacheNodes(), and updateSmGraph().
|
static |
Definition at line 383 of file topviewfuncs.c.
References agfstnode(), agfstout(), agnxtnode(), agnxtout(), draw_edge(), draw_xdot(), ED_posHead, ED_posTail, ED_selected, freeXDot(), getEdgeLength(), object_color(), parseXdotwithattrs(), and glCompPoint::z.
Referenced by cacheSelectedEdges().
|
static |
Definition at line 252 of file topviewfuncs.c.
References glCompColor::A, agfstnode(), agnxtnode(), agxget(), glCompColor::B, draw_xdot(), drawCircle(), freeXDot(), glCompColor::G, getAttrBool(), GG_nodelabelcolor, glCompColorxlate(), glprintfglut(), _ViewInfo::glutfont, labelOf(), ND_A, ND_printLabel, ND_selected, ND_size, parseXdotwithattrs(), glCompColor::R, _ViewInfo::selectedNodeColor, view, glCompPoint::x, glCompPoint::y, and glCompPoint::z.
Referenced by cacheSelectedNodes().
void renderSmGraph | ( | topview * | t | ) |
Definition at line 877 of file topviewfuncs.c.
References topview::cache, _ViewInfo::drawedgelabels, _ViewInfo::drawedges, _ViewInfo::drawnodelabels, _ViewInfo::drawnodes, topviewcache::edge_id, topviewcache::edgelabel_id, topview::fitin_zoom, _ViewInfo::labelnumberofnodes, topviewcache::node_id, topviewcache::nodelabel_id, _ViewInfo::nodeScale, topviewcache::seledge_id, topviewcache::selnode_id, view, and _ViewInfo::zoom.
Referenced by glexpose_drawgraph().
|
static |
Definition at line 53 of file topviewfuncs.c.
References agfstnode(), agnxtnode(), agxget(), _ViewInfo::bdxLeft, _ViewInfo::bdxRight, _ViewInfo::bdyBottom, _ViewInfo::bdyTop, getPointFromStr(), GN_pos, left, right, top(), view, glCompPoint::x, and glCompPoint::y.
Referenced by updateSmGraph().
|
static |
Definition at line 443 of file topviewfuncs.c.
References gv_isspace().
Referenced by countPoints().
|
static |
Definition at line 434 of file topviewfuncs.c.
References gv_isspace().
Referenced by countPoints(), and storePoints().
|
static |
Definition at line 541 of file topviewfuncs.c.
References ps, readPoint(), and skipWS().
Referenced by makeXDotSpline().
Definition at line 812 of file topviewfuncs.c.
References AGEDGE, agfstnode(), agfstout(), aginit(), AGNODE, agnxtnode(), agnxtout(), cacheEdgeLabels(), cacheEdges(), cacheNodeLabels(), cacheNodes(), cacheSelectedEdges(), cacheSelectedNodes(), getEdgeLength(), topview::global_z, topview::maxedgelen, topview::minedgelen, topview::Nodecount, renderNodes(), topview::sel, _selection::selPoly, set_boundaries(), _ViewInfo::Topview, and view.
Referenced by initSmGraph(), on_settingsApplyBtn_clicked(), tv_hide_all(), and tv_show_all().
|
static |
Definition at line 125 of file topviewfuncs.c.
References agxget(), and mapbool().
Referenced by object_color().