Graphviz
12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
aspect.c
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
#include <assert.h>
12
#include <
cgraph/alloc.h
>
13
#include <
cgraph/bitarray.h
>
14
#include <
dotgen/dot.h
>
15
#include <stddef.h>
16
17
/*
18
* Author: Mohammad T. Irfan
19
* Summer, 2008
20
*/
21
22
/* TODO:
23
* - Support clusters
24
* - Support disconnected graphs
25
* - Provide algorithms for aspect ratios < 1
26
*/
27
28
#define DEF_PASSES 5
29
30
void
setAspect
(
Agraph_t
*g) {
31
double
rv;
32
char
*p;
33
int
r, passes =
DEF_PASSES
;
34
35
p =
agget
(g,
"aspect"
);
36
37
if
(!p || ((r = sscanf (p,
"%lf,%d"
, &rv, &passes)) <= 0)) {
38
return
;
39
}
40
agwarningf
(
"the aspect attribute has been disabled due to implementation flaws - attribute ignored.\n"
);
41
}
alloc.h
Memory allocation wrappers that exit on failure.
DEF_PASSES
#define DEF_PASSES
Definition
aspect.c:28
setAspect
void setAspect(Agraph_t *g)
Definition
aspect.c:30
bitarray.h
API for compacted arrays of booleans.
dot.h
agget
char * agget(void *obj, char *name)
Definition
attr.c:442
agwarningf
void agwarningf(const char *fmt,...)
Definition
agerror.c:173
Agraph_s
graph or subgraph
Definition
cgraph.h:425
lib
dotgen
aspect.c
Generated by
1.9.8