Graphviz  2.35.20130930.0449
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, textpara_t *para, char **fontpath)
42 {
44 
45  if (gvte && gvte->textlayout)
46  return gvte->textlayout(para, fontpath);
47  return FALSE;
48 }