Graphviz 13.1.2~dev.20250807.2324
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#if !defined(__CYGWIN__) && defined(__GNUC__) && !defined(__MINGW32__)
22#define INTERNAL __attribute__((visibility("hidden")))
23#else
24#define INTERNAL /* nothing */
25#endif
26
27#define DFLT_MARGIN 4 /* 4 points */
28
36
37typedef struct {
39 char *print;
40 int value;
41 double scaling;
43
44typedef struct {
45 double x, y;
46 bool doAdd; /* if true, x and y are in points */
47} expand_t;
48
55INTERNAL int cAdjust(graph_t *, int);
56INTERNAL int scAdjust(graph_t *, int);
57INTERNAL void graphAdjustMode(graph_t *G, adjust_data*, char* dflt);
58INTERNAL double *getSizes(Agraph_t * g, pointf pad, int *n_elabels, int **elabels);
60
61#undef INTERNAL
62
63#ifdef __cplusplus
64}
65#endif
#define INTERNAL
Definition adjust.h:24
INTERNAL int adjustNodes(graph_t *G)
Definition adjust.c:1019
INTERNAL int removeOverlapWith(graph_t *, adjust_data *)
Definition adjust.c:913
INTERNAL int cAdjust(graph_t *, int)
Definition constraint.c:552
INTERNAL SparseMatrix makeMatrix(Agraph_t *g)
Definition adjust.c:556
INTERNAL expand_t sepFactor(graph_t *G)
Definition adjust.c:1066
INTERNAL int scAdjust(graph_t *, int)
Definition constraint.c:784
INTERNAL double * getSizes(Agraph_t *g, pointf pad, int *n_elabels, int **elabels)
Set up array of half sizes in inches.
Definition adjust.c:526
INTERNAL void graphAdjustMode(graph_t *G, adjust_data *, char *dflt)
Definition adjust.c:877
adjust_mode
Definition adjust.h:29
@ AM_PORTHOYX
Definition adjust.h:33
@ AM_NONE
Definition adjust.h:30
@ AM_PUSH
Definition adjust.h:31
@ AM_VPSC
Definition adjust.h:34
@ AM_PORTHO
Definition adjust.h:33
@ AM_ORTHO_YX
Definition adjust.h:32
@ AM_ORTHO
Definition adjust.h:32
@ AM_PORTHO_YX
Definition adjust.h:33
@ AM_NSCALE
Definition adjust.h:31
@ AM_SCALE
Definition adjust.h:31
@ AM_SCALEXY
Definition adjust.h:31
@ AM_IPSEP
Definition adjust.h:34
@ AM_ORTHOYX
Definition adjust.h:32
@ AM_PRISM
Definition adjust.h:34
@ AM_VOR
Definition adjust.h:30
@ AM_ORTHOXY
Definition adjust.h:32
@ AM_PORTHOXY
Definition adjust.h:33
@ AM_COMPRESS
Definition adjust.h:33
@ AM_PUSHPULL
Definition adjust.h:31
INTERNAL int normalize(graph_t *g)
Definition adjust.c:736
INTERNAL expand_t esepFactor(graph_t *G)
Definition adjust.c:1091
INTERNAL int removeOverlapAs(graph_t *, char *)
Use flag value to determine if and how to remove node overlaps.
Definition adjust.c:1006
#define G
Definition gdefs.h:7
geometric types and macros (e.g. points and boxes)
graph or subgraph
Definition cgraph.h:424
int value
Definition adjust.h:40
double scaling
Definition adjust.h:41
char * print
Definition adjust.h:39
adjust_mode mode
Definition adjust.h:38
double x
Definition adjust.h:45
bool doAdd
Definition adjust.h:46