|
Graphviz
2.29.20120524.0446
|
00001 /* $Id$ $Revision$ */ 00002 /* vim:set shiftwidth=4 ts=8: */ 00003 00004 /************************************************************************* 00005 * Copyright (c) 2011 AT&T Intellectual Property 00006 * All rights reserved. This program and the accompanying materials 00007 * are made available under the terms of the Eclipse Public License v1.0 00008 * which accompanies this distribution, and is available at 00009 * http://www.eclipse.org/legal/epl-v10.html 00010 * 00011 * Contributors: See CVS logs. Details at http://www.graphviz.org/ 00012 *************************************************************************/ 00013 00014 /* 00015 * textlayout engine wrapper 00016 */ 00017 00018 #ifdef HAVE_CONFIG_H 00019 #include "config.h" 00020 #endif 00021 00022 #include "const.h" 00023 #include "gvplugin_textlayout.h" 00024 #include "gvcint.h" 00025 #include "gvcproc.h" 00026 00027 int gvtextlayout_select(GVC_t * gvc) 00028 { 00029 gvplugin_available_t *plugin; 00030 gvplugin_installed_t *typeptr; 00031 00032 plugin = gvplugin_load(gvc, API_textlayout, "textlayout"); 00033 if (plugin) { 00034 typeptr = plugin->typeptr; 00035 gvc->textlayout.engine = (gvtextlayout_engine_t *) (typeptr->engine); 00036 return GVRENDER_PLUGIN; /* FIXME - need more suitable success code */ 00037 } 00038 return NO_SUPPORT; 00039 } 00040 00041 boolean gvtextlayout(GVC_t *gvc, textpara_t *para, char **fontpath) 00042 { 00043 gvtextlayout_engine_t *gvte = gvc->textlayout.engine; 00044 00045 if (gvte && gvte->textlayout) 00046 return gvte->textlayout(para, fontpath); 00047 return FALSE; 00048 }
1.7.5