Graphviz
13.0.0~dev.20241220.2304
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 v1.0
12
* which accompanies this distribution, and is available at
13
* https://www.eclipse.org/legal/epl-v10.html
14
*
15
* Contributors: Details at https://graphviz.org
16
*************************************************************************/
17
18
#pragma once
19
20
#ifdef __cplusplus
21
extern
"C"
{
22
#endif
23
24
#define GV_TEXTFONT_FLAGS_WIDTH 7
25
26
/* Bold, Italic, Underline, Sup, Sub, Strike */
27
/* Stored in textfont_t.flags, which is GV_TEXTFONT_FLAGS_WIDTH bits, so full */
28
/* Probably should be moved to textspan_t */
29
#define HTML_BF (1 << 0)
30
#define HTML_IF (1 << 1)
31
#define HTML_UL (1 << 2)
32
#define HTML_SUP (1 << 3)
33
#define HTML_SUB (1 << 4)
34
#define HTML_S (1 << 5)
35
#define HTML_OL (1 << 6)
36
37
typedef
struct
_PostscriptAlias
{
38
char
*
name
;
39
char
*
family
;
40
char
*
weight
;
41
char
*
stretch
;
42
char
*
style
;
43
int
xfig_code
;
44
char
*
svg_font_family
;
45
char
*
svg_font_weight
;
46
char
*
svg_font_style
;
47
}
PostscriptAlias
;
48
49
/* font information
50
* If name or color is NULL, or size < 0, that attribute
51
* is unspecified.
52
*/
53
typedef
struct
{
54
char
*
name
;
55
char
*
color
;
56
PostscriptAlias
*
postscript_alias
;
57
double
size
;
58
unsigned
int
flags
:
GV_TEXTFONT_FLAGS_WIDTH
;
// HTML_UL, HTML_IF, HTML_BF, etc.
59
unsigned
int
cnt
:(
sizeof
(
unsigned
int) * 8 -
GV_TEXTFONT_FLAGS_WIDTH
);
61
}
textfont_t
;
62
63
/* atomic unit of text emitted using a single htmlfont_t */
64
typedef
struct
{
65
char
*
str
;
/* stored in utf-8 */
66
textfont_t
*
font
;
67
void
*
layout
;
68
void (*free_layout) (
void
*
layout
);
/* FIXME - this is ugly */
69
double
yoffset_layout,
yoffset_centerline
;
70
pointf
size
;
71
char
just
;
72
}
textspan_t
;
73
74
#ifdef __cplusplus
75
}
76
#endif
layout
static int layout(graph_t *g, layout_info *infop)
Definition
layout.c:811
_PostscriptAlias
Definition
textspan.h:37
_PostscriptAlias::svg_font_style
char * svg_font_style
Definition
textspan.h:46
_PostscriptAlias::family
char * family
Definition
textspan.h:39
_PostscriptAlias::svg_font_weight
char * svg_font_weight
Definition
textspan.h:45
_PostscriptAlias::xfig_code
int xfig_code
Definition
textspan.h:43
_PostscriptAlias::weight
char * weight
Definition
textspan.h:40
_PostscriptAlias::style
char * style
Definition
textspan.h:42
_PostscriptAlias::svg_font_family
char * svg_font_family
Definition
textspan.h:44
_PostscriptAlias::stretch
char * stretch
Definition
textspan.h:41
_PostscriptAlias::name
char * name
Definition
textspan.h:38
pointf_s
Definition
geom.h:29
textfont_t
Definition
textspan.h:53
textfont_t::color
char * color
Definition
textspan.h:55
textfont_t::name
char * name
Definition
textspan.h:54
textfont_t::postscript_alias
PostscriptAlias * postscript_alias
Definition
textspan.h:56
textfont_t::flags
unsigned int flags
Definition
textspan.h:58
textfont_t::size
double size
Definition
textspan.h:57
textfont_t::cnt
unsigned int cnt
reference count
Definition
textspan.h:59
textspan_t
Definition
textspan.h:64
textspan_t::str
char * str
Definition
textspan.h:65
textspan_t::just
char just
'l' 'n' 'r'
Definition
textspan.h:71
textspan_t::layout
void * layout
Definition
textspan.h:67
textspan_t::size
pointf size
Definition
textspan.h:70
textspan_t::font
textfont_t * font
Definition
textspan.h:66
textspan_t::yoffset_centerline
double yoffset_centerline
Definition
textspan.h:69
PostscriptAlias
struct _PostscriptAlias PostscriptAlias
GV_TEXTFONT_FLAGS_WIDTH
#define GV_TEXTFONT_FLAGS_WIDTH
Definition
textspan.h:24
lib
common
textspan.h
Generated by
1.9.8