Graphviz  2.41.20171026.1811
usershape.h
Go to the documentation of this file.
1 /* $Id$ $Revision$ */
2 /* vim:set shiftwidth=4 ts=8: */
3 
4 /*************************************************************************
5  * Copyright (c) 2011 AT&T Intellectual Property
6  * All rights reserved. This program and the accompanying materials
7  * are made available under the terms of the Eclipse Public License v1.0
8  * which accompanies this distribution, and is available at
9  * http://www.eclipse.org/legal/epl-v10.html
10  *
11  * Contributors: See CVS logs. Details at http://www.graphviz.org/
12  *************************************************************************/
13 
14 #ifndef USERSHAPE_H
15 #define USERSHAPE_H
16 
17 #include "cdt.h"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23  typedef enum { FT_NULL,
27  } imagetype_t;
28 
29  typedef enum {
30  IMAGESCALE_FALSE, /* no image scaling */
31  IMAGESCALE_TRUE, /* scale image to fit but keep aspect ratio */
32  IMAGESCALE_WIDTH, /* scale image width to fit, keep height fixed */
33  IMAGESCALE_HEIGHT, /* scale image height to fit, keep width fixed */
34  IMAGESCALE_BOTH /* scale image to fit without regard for aspect ratio */
35  } imagescale_t;
36 
37  typedef enum {
38  IMAGEPOS_TOP_LEFT, /* top left */
39  IMAGEPOS_TOP_CENTER, /* top center */
40  IMAGEPOS_TOP_RIGHT, /* top right */
41  IMAGEPOS_MIDDLE_LEFT, /* middle left */
42  IMAGEPOS_MIDDLE_CENTER, /* middle center (true center, the default)*/
43  IMAGEPOS_MIDDLE_RIGHT, /* middle right */
44  IMAGEPOS_BOTTOM_LEFT, /* bottom left */
45  IMAGEPOS_BOTTOM_CENTER, /* bottom center */
46  IMAGEPOS_BOTTOM_RIGHT /* bottom right */
47  } imagepos_t;
48 
49  typedef struct usershape_s usershape_t;
50 
51  struct usershape_s {
53  const char *name;
54  int macro_id;
55  boolean must_inline;
56  boolean nocache;
57  FILE *f;
59  char *stringtype;
60  int x, y, w, h, dpi;
61  void *data; /* data loaded by a renderer */
62  size_t datasize; /* size of data (if mmap'ed) */
63  void (*datafree)(usershape_t *us); /* renderer's function for freeing data */
64  };
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 #endif
void(* datafree)(usershape_t *us)
Definition: usershape.h:63
imagetype_t
Definition: usershape.h:23
char * stringtype
Definition: usershape.h:59
void * data
Definition: usershape.h:61
boolean must_inline
Definition: usershape.h:55
boolean nocache
Definition: usershape.h:56
int macro_id
Definition: usershape.h:54
FILE * f
Definition: usershape.h:57
size_t datasize
Definition: usershape.h:62
imagetype_t type
Definition: usershape.h:58
imagescale_t
Definition: usershape.h:29
Dtlink_t link
Definition: usershape.h:52
const char * name
Definition: usershape.h:53
imagepos_t
Definition: usershape.h:37