Graphviz
13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
usershape.h
Go to the documentation of this file.
1
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
* https://www.eclipse.org/legal/epl-v10.html
10
*
11
* Contributors: Details at https://graphviz.org
12
*************************************************************************/
13
14
#pragma once
15
16
#include "
cdt.h
"
17
#include <stdbool.h>
18
#include <stdio.h>
19
20
#ifdef __cplusplus
21
extern
"C"
{
22
#endif
23
24
typedef
enum
{
FT_NULL
,
25
FT_BMP
,
FT_GIF
,
FT_PNG
,
FT_JPEG
,
26
FT_PDF
,
FT_PS
,
FT_EPS
,
FT_SVG
,
FT_XML
,
27
FT_RIFF
,
FT_WEBP
,
FT_ICO
,
FT_TIFF
28
}
imagetype_t
;
29
30
typedef
enum
{
31
IMAGESCALE_FALSE
,
/* no image scaling */
32
IMAGESCALE_TRUE
,
/* scale image to fit but keep aspect ratio */
33
IMAGESCALE_WIDTH
,
/* scale image width to fit, keep height fixed */
34
IMAGESCALE_HEIGHT
,
/* scale image height to fit, keep width fixed */
35
IMAGESCALE_BOTH
/* scale image to fit without regard for aspect ratio */
36
}
imagescale_t
;
37
38
typedef
enum
{
39
IMAGEPOS_TOP_LEFT
,
/* top left */
40
IMAGEPOS_TOP_CENTER
,
/* top center */
41
IMAGEPOS_TOP_RIGHT
,
/* top right */
42
IMAGEPOS_MIDDLE_LEFT
,
/* middle left */
43
IMAGEPOS_MIDDLE_CENTER
,
/* middle center (true center, the default)*/
44
IMAGEPOS_MIDDLE_RIGHT
,
/* middle right */
45
IMAGEPOS_BOTTOM_LEFT
,
/* bottom left */
46
IMAGEPOS_BOTTOM_CENTER
,
/* bottom center */
47
IMAGEPOS_BOTTOM_RIGHT
/* bottom right */
48
}
imagepos_t
;
49
50
typedef
struct
usershape_s
usershape_t
;
51
52
struct
usershape_s
{
53
Dtlink_t
link
;
54
const
char
*
name
;
55
int
macro_id
;
56
bool
must_inline
;
57
bool
nocache
;
58
FILE *
f
;
59
imagetype_t
type
;
60
char
*
stringtype
;
61
double
x
,
y
,
w
,
h
;
62
int
dpi
;
63
void
*
data
;
/* data loaded by a renderer */
64
size_t
datasize
;
/* size of data (if mmap'ed) */
65
void (*
datafree
)(
usershape_t
*us);
/* renderer's function for freeing data */
66
};
67
68
#ifdef __cplusplus
69
}
70
#endif
cdt.h
container data types API
dtlink_s_
Definition
cdt.h:51
usershape_s
Definition
usershape.h:52
usershape_s::dpi
int dpi
Definition
usershape.h:62
usershape_s::name
const char * name
Definition
usershape.h:54
usershape_s::stringtype
char * stringtype
Definition
usershape.h:60
usershape_s::f
FILE * f
Definition
usershape.h:58
usershape_s::datafree
void(* datafree)(usershape_t *us)
Definition
usershape.h:65
usershape_s::link
Dtlink_t link
Definition
usershape.h:53
usershape_s::macro_id
int macro_id
Definition
usershape.h:55
usershape_s::datasize
size_t datasize
Definition
usershape.h:64
usershape_s::nocache
bool nocache
Definition
usershape.h:57
usershape_s::must_inline
bool must_inline
Definition
usershape.h:56
usershape_s::data
void * data
Definition
usershape.h:63
usershape_s::type
imagetype_t type
Definition
usershape.h:59
usershape_s::x
double x
Definition
usershape.h:61
usershape_s::y
double y
Definition
usershape.h:61
usershape_s::h
double h
Definition
usershape.h:61
usershape_s::w
double w
Definition
usershape.h:61
imagepos_t
imagepos_t
Definition
usershape.h:38
IMAGEPOS_MIDDLE_CENTER
@ IMAGEPOS_MIDDLE_CENTER
Definition
usershape.h:43
IMAGEPOS_BOTTOM_RIGHT
@ IMAGEPOS_BOTTOM_RIGHT
Definition
usershape.h:47
IMAGEPOS_TOP_RIGHT
@ IMAGEPOS_TOP_RIGHT
Definition
usershape.h:41
IMAGEPOS_MIDDLE_LEFT
@ IMAGEPOS_MIDDLE_LEFT
Definition
usershape.h:42
IMAGEPOS_TOP_CENTER
@ IMAGEPOS_TOP_CENTER
Definition
usershape.h:40
IMAGEPOS_BOTTOM_LEFT
@ IMAGEPOS_BOTTOM_LEFT
Definition
usershape.h:45
IMAGEPOS_TOP_LEFT
@ IMAGEPOS_TOP_LEFT
Definition
usershape.h:39
IMAGEPOS_BOTTOM_CENTER
@ IMAGEPOS_BOTTOM_CENTER
Definition
usershape.h:46
IMAGEPOS_MIDDLE_RIGHT
@ IMAGEPOS_MIDDLE_RIGHT
Definition
usershape.h:44
imagescale_t
imagescale_t
Definition
usershape.h:30
IMAGESCALE_BOTH
@ IMAGESCALE_BOTH
Definition
usershape.h:35
IMAGESCALE_WIDTH
@ IMAGESCALE_WIDTH
Definition
usershape.h:33
IMAGESCALE_FALSE
@ IMAGESCALE_FALSE
Definition
usershape.h:31
IMAGESCALE_TRUE
@ IMAGESCALE_TRUE
Definition
usershape.h:32
IMAGESCALE_HEIGHT
@ IMAGESCALE_HEIGHT
Definition
usershape.h:34
imagetype_t
imagetype_t
Definition
usershape.h:24
FT_BMP
@ FT_BMP
Definition
usershape.h:25
FT_PS
@ FT_PS
Definition
usershape.h:26
FT_ICO
@ FT_ICO
Definition
usershape.h:27
FT_NULL
@ FT_NULL
Definition
usershape.h:24
FT_TIFF
@ FT_TIFF
Definition
usershape.h:27
FT_EPS
@ FT_EPS
Definition
usershape.h:26
FT_SVG
@ FT_SVG
Definition
usershape.h:26
FT_WEBP
@ FT_WEBP
Definition
usershape.h:27
FT_GIF
@ FT_GIF
Definition
usershape.h:25
FT_JPEG
@ FT_JPEG
Definition
usershape.h:25
FT_RIFF
@ FT_RIFF
Definition
usershape.h:27
FT_PNG
@ FT_PNG
Definition
usershape.h:25
FT_XML
@ FT_XML
Definition
usershape.h:26
FT_PDF
@ FT_PDF
Definition
usershape.h:26
lib
common
usershape.h
Generated by
1.9.8