Graphviz  2.35.20130930.0449
textpara.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 TEXTPARA_H
15 #define TEXTPARA_H
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 /* Bold, Italic, Underline, Sup, Sub, Strike */
22 #define HTML_BF 1
23 #define HTML_IF 2
24 #define HTML_UL 4
25 #define HTML_SUP 8
26 #define HTML_SUB 16
27 #define HTML_S 32
28 
29  /* font information
30  * If name or color is NULL, or size < 0, that attribute
31  * is unspecified.
32  */
33  typedef struct {
34  char* name;
35  char* color;
36  int flags:7; /* HTML_UL, HTML_IF, HTML_BF, etc. */
37  int cnt:(sizeof(int) * 8 - 7); /* reference count */
38  double size;
39  } htmlfont_t;
40 
41  typedef struct _PostscriptAlias {
42  char* name;
43  char* family;
44  char* weight;
45  char* stretch;
46  char* style;
47  int xfig_code;
52 
53  /* atomic unit of text emitted using a single htmlfont_t */
54  typedef struct {
55  char *str; /* stored in utf-8 */
57  void *layout;
58  void (*free_layout) (void *layout); /* FIXME - this is ugly */
60  char *fontname; /* FIXME - use htmlfont_t */
61  double fontsize; /* FIXME - use htmlfont_t */
62  double size, yoffset_layout, yoffset_centerline;
63  double width, height; /* FIXME */
64  char just; /* 'l' 'n' 'r' */ /* FIXME */
65  } textpara_t;
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 #endif