]> granicus.if.org Git - graphviz/commitdiff
-Txlib nearly working
authorellson <devnull@localhost>
Wed, 28 Jun 2006 02:49:58 +0000 (02:49 +0000)
committerellson <devnull@localhost>
Wed, 28 Jun 2006 02:49:58 +0000 (02:49 +0000)
plugin/pango/Makefile.am
plugin/pango/gvrender_pango.c
plugin/xlib/Makefile.am
plugin/xlib/gvdevice_xlib.c

index 5b5897231275a1f6364d4dbb4d48c01f339cadde..4f56686fedd06a9e35e967ab2d170b456bcce87f 100644 (file)
@@ -8,7 +8,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/lib/gvc \
        -I$(top_srcdir)/lib/graph \
        -I$(top_srcdir)/lib/cdt \
-       $(PANGOCAIRO_CFLAGS) $(LIBGVC_CFLAGS)
+       $(PANGOCAIRO_CFLAGS)
 
 noinst_LTLIBRARIES = libgvplugin_pango_C.la
 
index 76711ba87527007bb200a93da39d53c5d4e95d18..5464f82a5149a267a973afbfe73963308f2d605c 100644 (file)
@@ -125,12 +125,8 @@ static void cairogen_begin_page(GVJ_t * job)
     fedisableexcept(FE_ALL_EXCEPT);
 #endif
 
-    if (job->external_surface) {
+    if (job->surface)
         cr = (cairo_t *) job->surface;
-       assert(cr);
-
-        cairo_save(cr);
-    }
 
     switch (job->render.id) {
 #ifdef CAIRO_HAS_PNG_FUNCTIONS
@@ -196,6 +192,7 @@ static void cairogen_begin_page(GVJ_t * job)
     }
     job->surface = (void *) cr;
 
+    cairo_save(cr);
     cairo_scale(cr, job->scale.x, job->scale.y);
     cairo_rotate(cr, job->rotation * M_PI / 180.);
     cairo_translate(cr, job->translation.x, job->translation.y);
@@ -440,14 +437,13 @@ static gvrender_features_t cairogen_features_ps = {
     "cairo",                   /* gvloadimage target for usershapes */
 };
 
-#if 0
 static gvrender_features_t cairogen_features_x = {
     GVRENDER_DOES_TRUECOLOR
        | GVRENDER_Y_GOES_DOWN
        | GVRENDER_DOES_TRANSFORM
        | GVRENDER_X11_EVENTS,  /* flags */
     0,                         /* default margin - points */
-    {96.,96.},                 /* default dpi */
+    {72.,72.},                 /* default dpi */
     0,                         /* knowncolors */
     0,                         /* sizeof knowncolors */
     RGBA_DOUBLE,               /* color_type */
@@ -461,7 +457,7 @@ static gvrender_features_t cairogen_features_gtk = {
        | GVRENDER_DOES_TRANSFORM
        | GVRENDER_X11_EVENTS,  /* flags */
     0,                         /* default margin - points */
-    {96.,96.},                 /* default dpi */
+    {72.,72.},                 /* default dpi */
     0,                         /* knowncolors */
     0,                         /* sizeof knowncolors */
     RGBA_DOUBLE,               /* color_type */
@@ -469,7 +465,6 @@ static gvrender_features_t cairogen_features_gtk = {
     "cairo",                   /* gvloadimage target for usershapes */
 };
 #endif
-#endif
 
 gvplugin_installed_t gvrender_pango_types[] = {
 #ifdef HAVE_PANGOCAIRO
@@ -485,7 +480,6 @@ gvplugin_installed_t gvrender_pango_types[] = {
 #ifdef CAIRO_HAS_SVG_SURFACE
     {FORMAT_SVG, "svg", -10, &cairogen_engine, &cairogen_features_ps},
 #endif
-#if 0
 #ifdef CAIRO_HAS_XCB_SURFACE
     {FORMAT_XCB, "xcb", 0, &cairogen_engine, &cairogen_features_x},
 #endif
@@ -505,7 +499,6 @@ gvplugin_installed_t gvrender_pango_types[] = {
     {FORMAT_GTK, "gtk", 0, &cairogen_engine, &cairogen_features_gtk},
     {FORMAT_XLIB, "xlib", 0, &cairogen_engine, &cairogen_features_x},
 #endif
-#endif
 #endif
     {0, NULL, 0, NULL, NULL}
 };
index 1d12898396fe930730fe0ef50fcf40991de062f8..5c45d9531fdff64897881832dbad38d7a16f0bec 100644 (file)
@@ -3,18 +3,23 @@
 
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
-       $(PANGOCAIRO_CFLAGS) \
-       $(LIBGVC_CFLAGS)
+       -I$(top_srcdir)/lib/common \
+       -I$(top_srcdir)/lib/pathplan \
+       -I$(top_srcdir)/lib/gvc \
+       -I$(top_srcdir)/lib/graph \
+       -I$(top_srcdir)/lib/cdt \
+       $(PANGOCAIRO_CFLAGS)
 
 if WITH_X
-lib_LTLIBRARIES = libgvplugin_xlib.la
-endif
+noinst_LTLIBRARIES = libgvplugin_xlib_C.la
 
-libgvplugin_xlib_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined
+pkglib_LTLIBRARIES = libgvplugin_xlib.la
+endif
 
-libgvplugin_xlib_la_SOURCES = \
+libgvplugin_xlib_C_la_SOURCES = \
        gvplugin_xlib.c \
        gvdevice_xlib.c
 
-libgvplugin_xlib_la_LIBADD = \
-       $(PANGOCAIRO_LIBS)
+libgvplugin_xlib_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined
+libgvplugin_xlib_la_SOURCES = $(libgvplugin_xlib_C_la_SOURCES)
+libgvplugin_xlib_la_LIBADD = @PANGOCAIRO_LIBS@
index a3c78b71190555ae385c4fac2f7d3822017b9a73..bb843e8a236034da3b60716a94fa90964f55a3ae 100644 (file)
@@ -48,7 +48,7 @@
 #include <X11/Xutil.h>
 #include <X11/extensions/Xrender.h>
 
-#include <gvplugin_device.h>
+#include "gvplugin_device.h"
 
 typedef struct window_xlib_s {
     Window win;
@@ -420,6 +420,7 @@ static void finalize(GVJ_t *firstjob)
     KeyCode *keycodes;
     static char *dir;
     char *p, *cwd = NULL;
+    struct timeval timeout;
 
     FD_ZERO(&rfds);
 
@@ -480,6 +481,13 @@ static void finalize(GVJ_t *firstjob)
     for (job = firstjob; job; job = job->next_active)
        init_window(job, dpy, scr);
 
+    ret = handle_xlib_events(firstjob, dpy);
+
+    /* FIXME - poll for initial expose event */
+    timeout.tv_sec = 0;
+    timeout.tv_usec = 10000;
+    select(0, NULL, NULL, NULL, &timeout);
+
     xlib_fd = XConnectionNumber(dpy);
     
     /* This is the event loop */