| 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 "config.h" |
| 12 |
|
| 13 |
#include <dotgen/dot.h> |
| 14 |
#include <stdio.h> |
| 15 |
|
| 16 |
/* |
| 17 |
* Author: Mohammad T. Irfan |
| 18 |
* Summer, 2008 |
| 19 |
*/ |
| 20 |
|
| 21 |
/* TODO: |
| 22 |
* - Support clusters |
| 23 |
* - Support disconnected graphs |
| 24 |
* - Provide algorithms for aspect ratios < 1 |
| 25 |
*/ |
| 26 |
|
| 27 |
void setAspect(Agraph_t *g) { |
| 28 |
const char *const p = agget(g, "aspect"); |
| 29 |
|
| 30 |
if (!p || sscanf(p, "%lf,%d", &(double){0}, &(int){0}) <= 0) { |
| 31 |
return; |
| 32 |
} |
| 33 |
agwarningf("the aspect attribute has been disabled due to implementation " |
| 34 |
"flaws - attribute ignored.\n"); |
| 35 |
} |