Graphviz
2.41.20171026.1811
Main Page
Data Structures
Files
File List
Globals
lib
common
textspan.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 TEXTSPAN_H
15
#define TEXTSPAN_H
16
17
#ifdef __cplusplus
18
extern
"C"
{
19
#endif
20
21
/* Bold, Italic, Underline, Sup, Sub, Strike */
22
/* Stored in textfont_t.flags, which is 7 bits, so full */
23
/* Probably should be moved to textspan_t */
24
#define HTML_BF (1 << 0)
25
#define HTML_IF (1 << 1)
26
#define HTML_UL (1 << 2)
27
#define HTML_SUP (1 << 3)
28
#define HTML_SUB (1 << 4)
29
#define HTML_S (1 << 5)
30
#define HTML_OL (1 << 6)
31
32
typedef
struct
_PostscriptAlias
{
33
char
*
name
;
34
char
*
family
;
35
char
*
weight
;
36
char
*
stretch
;
37
char
*
style
;
38
int
xfig_code
;
39
char
*
svg_font_family
;
40
char
*
svg_font_weight
;
41
char
*
svg_font_style
;
42
}
PostscriptAlias
;
43
44
/* font information
45
* If name or color is NULL, or size < 0, that attribute
46
* is unspecified.
47
*/
48
typedef
struct
{
49
char
*
name
;
50
char
*
color
;
51
PostscriptAlias
*
postscript_alias
;
52
double
size
;
53
unsigned
int
flags:7;
/* HTML_UL, HTML_IF, HTML_BF, etc. */
54
unsigned
int
cnt:(
sizeof
(
unsigned
int
) * 8 - 7);
/* reference count */
55
}
textfont_t
;
56
57
/* atomic unit of text emitted using a single htmlfont_t */
58
typedef
struct
{
59
char
*
str
;
/* stored in utf-8 */
60
textfont_t
*
font
;
61
void
*
layout
;
62
void (*free_layout) (
void
*
layout
);
/* FIXME - this is ugly */
63
double
yoffset_layout
, yoffset_centerline;
64
pointf
size
;
65
char
just
;
/* 'l' 'n' 'r' */
/* FIXME */
66
}
textspan_t
;
67
68
#ifdef __cplusplus
69
}
70
#endif
71
#endif
textspan_t::size
pointf size
Definition:
textspan.h:64
textfont_t
Definition:
textspan.h:48
layout
bool layout(Agraph_t *g, const char *engine)
Definition:
gv.cpp:809
_PostscriptAlias::weight
char * weight
Definition:
textspan.h:35
textfont_t::size
double size
Definition:
textspan.h:52
_PostscriptAlias::stretch
char * stretch
Definition:
textspan.h:36
pointf_s
Definition:
geom.h:28
_PostscriptAlias::name
char * name
Definition:
textspan.h:33
_PostscriptAlias::svg_font_style
char * svg_font_style
Definition:
textspan.h:41
textfont_t::name
char * name
Definition:
textspan.h:49
PostscriptAlias
struct _PostscriptAlias PostscriptAlias
textspan_t::str
char * str
Definition:
textspan.h:59
int
int
Definition:
grammar.c:1264
_PostscriptAlias::xfig_code
int xfig_code
Definition:
textspan.h:38
textfont_t::postscript_alias
PostscriptAlias * postscript_alias
Definition:
textspan.h:51
_PostscriptAlias::svg_font_weight
char * svg_font_weight
Definition:
textspan.h:40
textfont_t::color
char * color
Definition:
textspan.h:50
textspan_t
Definition:
textspan.h:58
textspan_t::yoffset_layout
double yoffset_layout
Definition:
textspan.h:63
textspan_t::just
char just
Definition:
textspan.h:65
_PostscriptAlias::style
char * style
Definition:
textspan.h:37
_PostscriptAlias::svg_font_family
char * svg_font_family
Definition:
textspan.h:39
_PostscriptAlias
Definition:
textspan.h:32
_PostscriptAlias::family
char * family
Definition:
textspan.h:34
textspan_t::font
textfont_t * font
Definition:
textspan.h:60
textspan_t::layout
void * layout
Definition:
textspan.h:61
Generated by
1.8.5