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