/misc/src/release/graphviz-2.18-1/src/graphviz-2.18/lib/gvc/gvtextlayout.c

Go to the documentation of this file.
00001 /* $Id: gvtextlayout.c,v 1.23 2007/08/30 19:20:21 ellson Exp $ $Revision: 1.23 $ */
00002 /* vim:set shiftwidth=4 ts=8: */
00003 
00004 /**********************************************************
00005 *      This software is part of the graphviz package      *
00006 *                http://www.graphviz.org/                 *
00007 *                                                         *
00008 *            Copyright (c) 1994-2004 AT&T Corp.           *
00009 *                and is licensed under the                *
00010 *            Common Public License, Version 1.0           *
00011 *                      by AT&T Corp.                      *
00012 *                                                         *
00013 *        Information and Software Systems Research        *
00014 *              AT&T Research, Florham Park NJ             *
00015 **********************************************************/
00016 
00017 /*
00018  *  textlayout engine wrapper
00019  */
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include "config.h"
00023 #endif
00024 
00025 #include "const.h"
00026 #include "gvplugin_textlayout.h"
00027 #include "gvcint.h"
00028 #include "gvcproc.h"
00029 
00030 int gvtextlayout_select(GVC_t * gvc)
00031 {
00032     gvplugin_available_t *plugin;
00033     gvplugin_installed_t *typeptr;
00034 
00035     plugin = gvplugin_load(gvc, API_textlayout, "textlayout");
00036     if (plugin) {
00037         typeptr = plugin->typeptr;
00038         gvc->textlayout.engine = (gvtextlayout_engine_t *) (typeptr->engine);
00039         return GVRENDER_PLUGIN;  /* FIXME - need more suitable success code */
00040     }
00041     return NO_SUPPORT;
00042 }
00043 
00044 boolean gvtextlayout(GVC_t *gvc, textpara_t *para, char **fontpath)
00045 {
00046     gvtextlayout_engine_t *gvte = gvc->textlayout.engine;
00047 
00048     if (gvte && gvte->textlayout)
00049         return gvte->textlayout(para, fontpath);
00050     return FALSE;
00051 }

Generated on Mon Mar 31 19:03:27 2008 for Graphviz by  doxygen 1.5.1