Graphviz 13.0.0~dev.20241220.2304
|
#include <sparse/general.h>
#include <math.h>
#include <stdbool.h>
#include <string.h>
#include <time.h>
#include <sparse/SparseMatrix.h>
#include <edgepaint/edge_distinct_coloring.h>
#include <edgepaint/node_distinct_coloring.h>
#include <sparse/DotIO.h>
#include <edgepaint/intersection.h>
#include <sparse/QuadTree.h>
#include <util/alloc.h>
Go to the source code of this file.
Functions | |
static int | splines_intersect (size_t dim, double cos_critical, int check_edges_with_same_endpoint, char *xsplines1, char *xsplines2) |
Agraph_t * | edge_distinct_coloring (const char *color_scheme, int *lightness, Agraph_t *g, double angle, double accuracy, int check_edges_with_same_endpoint, int seed) |
Agraph_t * edge_distinct_coloring | ( | const char * | color_scheme, |
int * | lightness, | ||
Agraph_t * | g, | ||
double | angle, | ||
double | accuracy, | ||
int | check_edges_with_same_endpoint, | ||
int | seed | ||
) |
color the edges of a graph so that conflicting edges are as distinct in color as possible
color_scheme | rgb, lab, gray, or a list of comma separated RGB colors in hex, like #ff0000,#00ff00 |
lightness | of the form 0,70, specifying the range of lightness of LAB color. Ignored if scheme is not COLOR_LAB. |
g | the graph |
angle | if two edges cross at an angle < "angle", consider they as conflict |
accuracy | how accurate when finding color of an edge to be as different from others |
check_edges_with_same_endpoint | if TRUE, we will check edges with same end point and only consider them as conflict if their angle is very small. Edges that share an end point and is close to 180 degree are not consider conflict. |
seed | random_seed. If negative, consider -seed as the number of random start iterations |
Definition at line 142 of file edge_distinct_coloring.c.
References A, attach_edge_colors(), B, C, dim, FORMAT_COORD, free(), Import_dot_splines(), intersection_angle(), MATRIX_TYPE_REAL, node_distinct_coloring(), NULL, RETURN, seed, SparseMatrix_coordinate_form_add_entry(), SparseMatrix_delete(), SparseMatrix_from_coordinate_format(), SparseMatrix_import_dot(), SparseMatrix_new(), splines_intersect(), and Verbose.
Referenced by clarify().
|
static |
Definition at line 24 of file edge_distinct_coloring.c.
References dim, free(), gv_calloc(), gv_recalloc(), intersection_angle(), and MAX.
Referenced by edge_distinct_coloring().