Graphviz
2.41.20171026.1811
Main Page
Data Structures
Files
File List
Globals
lib
common
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
,
24
FT_BMP
,
FT_GIF
,
FT_PNG
,
FT_JPEG
,
25
FT_PDF
,
FT_PS
,
FT_EPS
,
FT_SVG
,
FT_XML
,
26
FT_RIFF
,
FT_WEBP
,
FT_ICO
,
FT_TIFF
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
{
52
Dtlink_t
link
;
53
const
char
*
name
;
54
int
macro_id
;
55
boolean
must_inline
;
56
boolean
nocache
;
57
FILE *
f
;
58
imagetype_t
type
;
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
IMAGEPOS_MIDDLE_LEFT
Definition:
usershape.h:41
usershape_s::datafree
void(* datafree)(usershape_t *us)
Definition:
usershape.h:63
IMAGESCALE_BOTH
Definition:
usershape.h:34
FT_WEBP
Definition:
usershape.h:26
IMAGESCALE_TRUE
Definition:
usershape.h:31
IMAGESCALE_HEIGHT
Definition:
usershape.h:33
IMAGEPOS_TOP_CENTER
Definition:
usershape.h:39
imagetype_t
imagetype_t
Definition:
usershape.h:23
FT_PS
Definition:
usershape.h:25
usershape_s::stringtype
char * stringtype
Definition:
usershape.h:59
FT_XML
Definition:
usershape.h:25
usershape_s::data
void * data
Definition:
usershape.h:61
IMAGEPOS_BOTTOM_LEFT
Definition:
usershape.h:44
usershape_s::x
int x
Definition:
usershape.h:60
usershape_s::must_inline
boolean must_inline
Definition:
usershape.h:55
FT_JPEG
Definition:
usershape.h:24
cdt.h
IMAGEPOS_BOTTOM_RIGHT
Definition:
usershape.h:46
usershape_s::w
int w
Definition:
usershape.h:60
usershape_s::nocache
boolean nocache
Definition:
usershape.h:56
usershape_s::macro_id
int macro_id
Definition:
usershape.h:54
FT_PDF
Definition:
usershape.h:25
FT_TIFF
Definition:
usershape.h:26
FT_EPS
Definition:
usershape.h:25
usershape_s::f
FILE * f
Definition:
usershape.h:57
IMAGESCALE_WIDTH
Definition:
usershape.h:32
usershape_s::datasize
size_t datasize
Definition:
usershape.h:62
usershape_s::h
int h
Definition:
usershape.h:60
usershape_s::type
imagetype_t type
Definition:
usershape.h:58
_dtlink_s
Definition:
cdt.h:44
imagescale_t
imagescale_t
Definition:
usershape.h:29
IMAGEPOS_TOP_RIGHT
Definition:
usershape.h:40
IMAGEPOS_MIDDLE_CENTER
Definition:
usershape.h:42
usershape_s::y
int y
Definition:
usershape.h:60
FT_BMP
Definition:
usershape.h:24
FT_NULL
Definition:
usershape.h:23
FT_GIF
Definition:
usershape.h:24
FT_ICO
Definition:
usershape.h:26
usershape_s
Definition:
usershape.h:51
usershape_s::link
Dtlink_t link
Definition:
usershape.h:52
FT_PNG
Definition:
usershape.h:24
FT_RIFF
Definition:
usershape.h:26
usershape_s::dpi
int dpi
Definition:
usershape.h:60
FT_SVG
Definition:
usershape.h:25
IMAGESCALE_FALSE
Definition:
usershape.h:30
IMAGEPOS_TOP_LEFT
Definition:
usershape.h:38
IMAGEPOS_MIDDLE_RIGHT
Definition:
usershape.h:43
usershape_s::name
const char * name
Definition:
usershape.h:53
IMAGEPOS_BOTTOM_CENTER
Definition:
usershape.h:45
imagepos_t
imagepos_t
Definition:
usershape.h:37
Generated by
1.8.5