Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
adjust.h
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (c) 2011 AT&T Intellectual Property
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * https://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors: Details at https://graphviz.org
9 *************************************************************************/
10
11#pragma once
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17#include "geom.h"
18#include <sparse/SparseMatrix.h>
19#include <stdbool.h>
20
21#define DFLT_MARGIN 4 /* 4 points */
22
30
31typedef struct {
33 char *print;
34 int value;
35 double scaling;
37
38typedef struct {
39 double x, y;
40 bool doAdd; /* if true, x and y are in points */
41} expand_t;
42
43 extern expand_t sepFactor(graph_t * G);
44 extern expand_t esepFactor(graph_t * G);
45 extern int adjustNodes(graph_t * G);
46 extern int normalize(graph_t * g);
47 extern int removeOverlapAs(graph_t*, char*);
49 extern int cAdjust(graph_t *, int);
50 extern int scAdjust(graph_t *, int);
51 extern void graphAdjustMode(graph_t *G, adjust_data*, char* dflt);
52 extern double *getSizes(Agraph_t * g, pointf pad, int *n_elabels, int **elabels);
54
55#ifdef __cplusplus
56}
57#endif
int removeOverlapAs(graph_t *, char *)
Use flag value to determine if and how to remove node overlaps.
Definition adjust.c:1009
SparseMatrix makeMatrix(Agraph_t *g)
Definition adjust.c:559
double * getSizes(Agraph_t *g, pointf pad, int *n_elabels, int **elabels)
Set up array of half sizes in inches.
Definition adjust.c:529
int cAdjust(graph_t *, int)
Definition constraint.c:555
expand_t esepFactor(graph_t *G)
Definition adjust.c:1094
void graphAdjustMode(graph_t *G, adjust_data *, char *dflt)
Definition adjust.c:880
int scAdjust(graph_t *, int)
Definition constraint.c:787
int adjustNodes(graph_t *G)
Definition adjust.c:1022
int normalize(graph_t *g)
Definition adjust.c:739
expand_t sepFactor(graph_t *G)
Definition adjust.c:1069
adjust_mode
Definition adjust.h:23
@ AM_PORTHOYX
Definition adjust.h:27
@ AM_NONE
Definition adjust.h:24
@ AM_PUSH
Definition adjust.h:25
@ AM_VPSC
Definition adjust.h:28
@ AM_PORTHO
Definition adjust.h:27
@ AM_ORTHO_YX
Definition adjust.h:26
@ AM_ORTHO
Definition adjust.h:26
@ AM_PORTHO_YX
Definition adjust.h:27
@ AM_NSCALE
Definition adjust.h:25
@ AM_SCALE
Definition adjust.h:25
@ AM_SCALEXY
Definition adjust.h:25
@ AM_IPSEP
Definition adjust.h:28
@ AM_ORTHOYX
Definition adjust.h:26
@ AM_PRISM
Definition adjust.h:28
@ AM_VOR
Definition adjust.h:24
@ AM_ORTHOXY
Definition adjust.h:26
@ AM_PORTHOXY
Definition adjust.h:27
@ AM_COMPRESS
Definition adjust.h:27
@ AM_PUSHPULL
Definition adjust.h:25
int removeOverlapWith(graph_t *, adjust_data *)
Definition adjust.c:916
#define G
Definition gdefs.h:7
geometric types and macros (e.g. points and boxes)
graph or subgraph
Definition cgraph.h:425
int value
Definition adjust.h:34
double scaling
Definition adjust.h:35
char * print
Definition adjust.h:33
adjust_mode mode
Definition adjust.h:32
double x
Definition adjust.h:39
bool doAdd
Definition adjust.h:40