Graphviz  2.41.20170921.2350
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;
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;
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 */
61  void *layout;
62  void (*free_layout) (void *layout); /* FIXME - this is ugly */
63  double yoffset_layout, yoffset_centerline;
65  char just; /* 'l' 'n' 'r' */ /* FIXME */
66  } textspan_t;
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 #endif
pointf size
Definition: textspan.h:64
bool layout(Agraph_t *g, const char *engine)
Definition: gv.cpp:809
char * weight
Definition: textspan.h:35
double size
Definition: textspan.h:52
char * stretch
Definition: textspan.h:36
Definition: geom.h:28
char * svg_font_style
Definition: textspan.h:41
char * name
Definition: textspan.h:49
struct _PostscriptAlias PostscriptAlias
char * str
Definition: textspan.h:59
int
Definition: grammar.c:1264
PostscriptAlias * postscript_alias
Definition: textspan.h:51
char * svg_font_weight
Definition: textspan.h:40
char * color
Definition: textspan.h:50
double yoffset_layout
Definition: textspan.h:63
char just
Definition: textspan.h:65
char * style
Definition: textspan.h:37
char * svg_font_family
Definition: textspan.h:39
char * family
Definition: textspan.h:34
textfont_t * font
Definition: textspan.h:60
void * layout
Definition: textspan.h:61