Graphviz  2.39.20141218.0545
gvtextlayout.c
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 /*
15  * textlayout engine wrapper
16  */
17 
18 #ifdef HAVE_CONFIG_H
19 #include "config.h"
20 #endif
21 
22 #include "const.h"
23 #include "gvplugin_textlayout.h"
24 #include "gvcint.h"
25 #include "gvcproc.h"
26 
28 {
29  gvplugin_available_t *plugin;
30  gvplugin_installed_t *typeptr;
31 
32  plugin = gvplugin_load(gvc, API_textlayout, "textlayout");
33  if (plugin) {
34  typeptr = plugin->typeptr;
35  gvc->textlayout.engine = (gvtextlayout_engine_t *) (typeptr->engine);
36  return GVRENDER_PLUGIN; /* FIXME - need more suitable success code */
37  }
38  return NO_SUPPORT;
39 }
40 
41 boolean gvtextlayout(GVC_t *gvc, textspan_t *span, char **fontpath)
42 {
44 
45  if (gvte && gvte->textlayout)
46  return gvte->textlayout(span, fontpath);
47  return FALSE;
48 }
#define GVRENDER_PLUGIN
Definition: const.h:150
gvplugin_available_t * gvplugin_load(GVC_t *gvc, api_t api, const char *type)
Definition: gvplugin.c:250
#define NO_SUPPORT
Definition: const.h:151
gvplugin_active_textlayout_t textlayout
Definition: gvcint.h:97
int gvtextlayout_select(GVC_t *gvc)
Definition: gvtextlayout.c:27
Definition: gvcint.h:70
boolean gvtextlayout(GVC_t *gvc, textspan_t *span, char **fontpath)
Definition: gvtextlayout.c:41
gvtextlayout_engine_t * engine
Definition: gvcint.h:36
GVC_t * gvc
Definition: htmlparse.c:87
gvplugin_installed_t * typeptr
Definition: gvcint.h:55
#define FALSE
Definition: cgraph.h:24
boolean(* textlayout)(textspan_t *span, char **fontpath)