comparison toolboxes/graph_visualisation/include/graphviz/usershape.h @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 /* $Id: usershape.h,v 1.15 2009/06/03 01:10:52 ellson Exp $ $Revision: 1.15 $ */
2 /* vim:set shiftwidth=4 ts=8: */
3
4 /**********************************************************
5 * This software is part of the graphviz package *
6 * http://www.graphviz.org/ *
7 * *
8 * Copyright (c) 1994-2004 AT&T Corp. *
9 * and is licensed under the *
10 * Common Public License, Version 1.0 *
11 * by AT&T Corp. *
12 * *
13 * Information and Software Systems Research *
14 * AT&T Research, Florham Park NJ *
15 **********************************************************/
16
17 #ifndef USERSHAPE_H
18 #define USERSHAPE_H
19
20 #include "cdt.h"
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 typedef enum { FT_NULL,
27 FT_BMP, FT_GIF, FT_PNG, FT_JPEG,
28 FT_PDF, FT_PS, FT_EPS, FT_SVG, FT_XML
29 } imagetype_t;
30
31 typedef enum {
32 IMAGESCALE_FALSE, /* no image scaling */
33 IMAGESCALE_TRUE, /* scale image to fit but keep aspect ratio */
34 IMAGESCALE_WIDTH, /* scale image width to fit, keep height fixed */
35 IMAGESCALE_HEIGHT, /* scale image height to fit, keep width fixed */
36 IMAGESCALE_BOTH /* scale image to fit without regard for aspect ratio */
37 } imagescale_t;
38
39 typedef struct usershape_s usershape_t;
40
41 struct usershape_s {
42 Dtlink_t link;
43 const char *name;
44 int macro_id;
45 boolean must_inline;
46 boolean nocache;
47 FILE *f;
48 imagetype_t type;
49 char *stringtype;
50 int x, y, w, h, dpi;
51 void *data; /* data loaded by a renderer */
52 size_t datasize; /* size of data (if mmap'ed) */
53 void (*datafree)(usershape_t *us); /* renderer's function for freeing data */
54 };
55
56 #ifdef __cplusplus
57 }
58 #endif
59 #endif