Graphviz
16.1.0~dev.20260826.0140
Loading...
Searching...
No Matches
textspan.h
Go to the documentation of this file.
1
8
/*************************************************************************
9
* Copyright (c) 2011 AT&T Intellectual Property
10
* All rights reserved. This program and the accompanying materials
11
* are made available under the terms of the Eclipse Public License v2.0
12
* which accompanies this distribution, and is available at
13
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
14
*
15
* Contributors: Details at https://graphviz.org
16
*************************************************************************/
17
18
#pragma once
19
20
#include "
geom.h
"
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
26
#define GV_TEXTFONT_FLAGS_WIDTH 7
27
28
/* Bold, Italic, Underline, Sup, Sub, Strike */
29
/* Stored in textfont_t.flags, which is GV_TEXTFONT_FLAGS_WIDTH bits, so full */
30
/* Probably should be moved to textspan_t */
31
#define HTML_BF (1 << 0)
32
#define HTML_IF (1 << 1)
33
#define HTML_UL (1 << 2)
34
#define HTML_SUP (1 << 3)
35
#define HTML_SUB (1 << 4)
36
#define HTML_S (1 << 5)
37
#define HTML_OL (1 << 6)
38
39
typedef
struct
_PostscriptAlias
{
40
char
*
name
;
41
char
*
family
;
42
char
*
weight
;
43
char
*
stretch
;
44
char
*
style
;
45
int
xfig_code
;
46
char
*
svg_font_family
;
47
char
*
svg_font_weight
;
48
char
*
svg_font_style
;
49
}
PostscriptAlias
;
50
51
/* font information
52
* If name or color is NULL, or size < 0, that attribute
53
* is unspecified.
54
*/
55
typedef
struct
{
56
char
*
name
;
57
char
*
color
;
58
PostscriptAlias
*
postscript_alias
;
59
double
size
;
60
unsigned
int
flags
61
:
GV_TEXTFONT_FLAGS_WIDTH
;
// HTML_UL, HTML_IF, HTML_BF, etc.
62
unsigned
int
cnt
: (
sizeof
(
unsigned
int) * 8 -
GV_TEXTFONT_FLAGS_WIDTH
);
64
}
textfont_t
;
65
66
/* atomic unit of text emitted using a single htmlfont_t */
67
typedef
struct
{
68
char
*
str
;
/* stored in utf-8 */
69
textfont_t
*
font
;
70
void
*
layout
;
71
void (*free_layout)(
void
*
layout
);
/* FIXME - this is ugly */
72
double
yoffset_layout,
yoffset_centerline
;
73
pointf
size
;
74
char
just
;
75
}
textspan_t
;
76
77
#ifdef __cplusplus
78
}
79
#endif
geom.h
geometric types and macros (e.g. points and boxes)
layout
static int layout(graph_t *g, layout_info *infop, size_t *counter)
Definition
layout.c:800
_PostscriptAlias
Definition
textspan.h:39
_PostscriptAlias::svg_font_style
char * svg_font_style
Definition
textspan.h:48
_PostscriptAlias::family
char * family
Definition
textspan.h:41
_PostscriptAlias::svg_font_weight
char * svg_font_weight
Definition
textspan.h:47
_PostscriptAlias::xfig_code
int xfig_code
Definition
textspan.h:45
_PostscriptAlias::weight
char * weight
Definition
textspan.h:42
_PostscriptAlias::style
char * style
Definition
textspan.h:44
_PostscriptAlias::svg_font_family
char * svg_font_family
Definition
textspan.h:46
_PostscriptAlias::stretch
char * stretch
Definition
textspan.h:43
_PostscriptAlias::name
char * name
Definition
textspan.h:40
pointf_s
Definition
geom.h:29
textfont_t
Definition
textspan.h:55
textfont_t::color
char * color
Definition
textspan.h:57
textfont_t::name
char * name
Definition
textspan.h:56
textfont_t::postscript_alias
PostscriptAlias * postscript_alias
Definition
textspan.h:58
textfont_t::flags
unsigned int flags
Definition
textspan.h:61
textfont_t::size
double size
Definition
textspan.h:59
textfont_t::cnt
unsigned int cnt
reference count
Definition
textspan.h:62
textspan_t
Definition
textspan.h:67
textspan_t::str
char * str
Definition
textspan.h:68
textspan_t::just
char just
'l' 'n' 'r'
Definition
textspan.h:74
textspan_t::layout
void * layout
Definition
textspan.h:70
textspan_t::size
pointf size
Definition
textspan.h:73
textspan_t::font
textfont_t * font
Definition
textspan.h:69
textspan_t::yoffset_centerline
double yoffset_centerline
Definition
textspan.h:72
PostscriptAlias
struct _PostscriptAlias PostscriptAlias
GV_TEXTFONT_FLAGS_WIDTH
#define GV_TEXTFONT_FLAGS_WIDTH
Definition
textspan.h:26
lib
common
textspan.h
Generated by
1.9.8