LIBS = $(LIBLTDL) $(SOCKET_LIBS)
pkginclude_HEADERS = gvc.h gvcint.h gvplugin.h \
- gvplugin_render.h gvplugin_layout.h gvplugin_textlayout.h gvplugin_device.h
+ gvplugin_render.h gvplugin_layout.h gvplugin_textlayout.h \
+ gvplugin_device.h gvplugin_usershape.h
pkglib_LTLIBRARIES = libgvc.la
libgvc_la_SOURCES = gvrender.c gvlayout.c gvtextlayout.c gvdevice.c \
- gvcontext.c gvjobs.c gvevent.c gvplugin.c gvconfig.c
+ gvcontext.c gvjobs.c gvevent.c gvplugin.c gvconfig.c gvusershape.c
EXTRA_DIST = Makefile.old
DEFINES = -DHAVE_CONFIG_H -DGVLIBDIR=$(LIBDIR)
HDRS = gvc.h gvcint.h gvplugin_render.h gvplugin_device.h \
- gvplugin_layout.h gvplugin_textlayout.h gvplugin.h
+ gvplugin_layout.h gvplugin_textlayout.h \
+ gvplugin_usershape.h gvplugin.h
OBJS = gvrender.o gvlayout.o gvdevice.o gvcontext.o gvjobs.o \
- gvplugin.o gvconfig.o gvevent.o gvtextlayout.o
+ gvplugin.o gvconfig.o gvevent.o gvtextlayout.o gvusershape.o
libgvc.a : $(OBJS)
$(RM) libgvc.a
/* emit */
extern void gvemit_graph(GVC_t * gvc, graph_t * g);
-/* text_layout */
+/* textlayout */
- extern int gvtext_select(GVC_t * gvc, char *text_layout);
- extern double gvtext_width(GVC_t *gvc, textline_t *textline,
- char *fontname, double fontsize,
- char *fontpath);
+ extern int gvtextlayout_select(GVC_t * gvc, char *textlayout);
+ extern double gvtextlayout_width(GVC_t *gvc, textline_t *textline,
+ char *fontname, double fontsize, char *fontpath);
+
+/* usershape */
+
+ extern int gvusershape_select(GVC_t * gvc, char *name);
+ extern void * gvusershape_getshape(GVC_t * gvc, char *usershape);
+ extern void gvusershape_freeeshapes(GVC_t * gvc);
+ extern point gvusershape_imagesize(GVC_t * gvc, char *usershape);
/* device */
gv_plugin_t *api[ APIS ]; /* array of current plugins per api */
#undef ELEM
- gvtextlayout_engine_t *textlayout_engine; /* current text_layout engine */
+ gvtextlayout_engine_t *textlayout_engine; /* current textlayout engine */
+ gvusershape_engine_t *usershape_engine; /* current usershape engine */
/* gvrender_begin_job() */
char *layout_type; /* string name of layout type */
gvlayout_engine_t *layout_engine; /* current layout engine */
int layout_id; /* internal id of current layout */
+
char *graphname; /* name from graph */
GVJ_t *active_jobs; /* linked list of active jobs */
**********************************************************/
/*
- * text_layout engine wrapper
+ * textlayout engine wrapper
*/
#ifdef HAVE_CONFIG_H
#include "gvplugin_textlayout.h"
#include "gvc.h"
-int gvtext_select(GVC_t * gvc, char *text_layout)
+int gvtextlayout_select(GVC_t * gvc, char *textlayout)
{
gv_plugin_t *plugin;
gvplugin_type_t *typeptr;
- plugin = gvplugin_load(gvc, API_textlayout, text_layout);
+ plugin = gvplugin_load(gvc, API_textlayout, textlayout);
if (plugin) {
typeptr = plugin->typeptr;
- gvc->layout_engine = (gvlayout_engine_t *) (typeptr->engine);
+ gvc->textlayout_engine = (gvtextlayout_engine_t *) (typeptr->engine);
return GVRENDER_PLUGIN; /* FIXME - need more suitable success code */
}
return NO_SUPPORT;
}
-double gvtext_width(GVC_t *gvc, textline_t *textline, char *fontname, double fontsize, char *fontpath)
+double gvtextlayout_width(GVC_t *gvc, textline_t *textline, char *fontname, double fontsize, char *fontpath)
{
gvtextlayout_engine_t *gvte = gvc->textlayout_engine;
--- /dev/null
+/* $Id$ $Revision$ */
+/* vim:set shiftwidth=4 ts=8: */
+
+/**********************************************************
+* This software is part of the graphviz package *
+* http://www.graphviz.org/ *
+* *
+* Copyright (c) 1994-2004 AT&T Corp. *
+* and is licensed under the *
+* Common Public License, Version 1.0 *
+* by AT&T Corp. *
+* *
+* Information and Software Systems Research *
+* AT&T Research, Florham Park NJ *
+**********************************************************/
+
+/*
+ * usershape engine wrapper
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+#include "const.h"
+#include "types.h"
+#include "macros.h"
+
+#include "gvplugin_usershape.h"
+#include "gvc.h"
+
+int gvusershape_select(GVC_t * gvc, char *usershape)
+{
+ gv_plugin_t *plugin;
+ gvplugin_type_t *typeptr;
+
+ plugin = gvplugin_load(gvc, API_usershape, usershape);
+ if (plugin) {
+ typeptr = plugin->typeptr;
+ gvc->usershape_engine = (gvusershape_engine_t *) (typeptr->engine);
+ return GVRENDER_PLUGIN; /* FIXME - need more suitable success code */
+ }
+ return NO_SUPPORT;
+}