]> 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)
configure.ac
lib/common/emit.c
plugin/Makefile.am
plugin/gtk/Makefile.am
plugin/gtk/callbacks.c
plugin/gtk/gvdevice_gtk.c

index f5f8ef83ae1bf89515140b38d9b826f695385a9e..13445ed7f78ce89ccd66b618907d7c9eb02c0cc7 100644 (file)
@@ -1884,6 +1884,7 @@ AC_CONFIG_FILES(Makefile
        plugin/pango/Makefile
        plugin/dot_layout/Makefile
        plugin/neato_layout/Makefile
+       plugin/xlib/Makefile
        cmd/Makefile
        cmd/dot/Makefile
        cmd/tools/Makefile
index 2222844bdc5e9df84272f18c7e16688d243b2cf5..72cfa66f31ea4fac9b06ffee5ea2ef15b6a3a71c 100644 (file)
@@ -259,10 +259,21 @@ static void init_job_pagination(GVJ_t * job, graph_t *g)
            margin.y += (pageSize.y - imageSize.y) / 2;
     }
 
-    job->canvasBox.LL.x = margin.x;
-    job->canvasBox.LL.y = margin.y;
-    job->canvasBox.UR.x = margin.x + imageSize.x;
-    job->canvasBox.UR.y = margin.y + imageSize.y;
+    job->canvasBox.LL.x = ROUND(job->margin.x);
+    job->canvasBox.LL.y = ROUND(job->margin.y);
+    job->canvasBox.UR.x = ROUND(job->margin.x) + imageSize.x;
+    job->canvasBox.UR.y = ROUND(job->margin.y) + imageSize.y;
+
+    /* calculate job->width and job->height with margins */
+    if (job->rotation) {
+        job->width = job->canvasBox.UR.y + job->canvasBox.LL.y;
+        job->height = job->canvasBox.UR.x + job->canvasBox.LL.x;
+    }
+    else {
+        job->width = job->canvasBox.UR.x + job->canvasBox.LL.x;
+        job->height = job->canvasBox.UR.y + job->canvasBox.LL.y;
+    }
+
 
 #if 0
 fprintf(stderr,"margin = %d,%d  imageSize = %d,%d pageBoundingBox = %d,%d %d,%d\n",
@@ -423,10 +434,6 @@ static void setup_page(GVJ_t * job, graph_t * g)
     else
         EXPANDBB(job->boundingBox, job->pageBoundingBox);
 
-    /* update job->width and job->height with margins */
-    job->width = job->boundingBox.UR.x + job->boundingBox.LL.x;
-    job->height = job->boundingBox.UR.y + job->boundingBox.LL.y;
-
     if (job->rotation) {
        if (job->flags & GVRENDER_Y_GOES_DOWN) {
            job->translation.x = -job->pageBox.UR.x - job->pageBoundingBox.LL.y / job->scale.y;
index 965348f593a936358d519dd926e8482db34bf0c1..b82d36a6eb4736109379c42b85e1c16ba2356fe0 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$ $Revision$
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS = core gd pango dot_layout neato_layout
+SUBDIRS = core gd pango dot_layout neato_layout xlib
 
 EXTRA_DIST = Makefile.old
index e7376f64449dc5d57f7431d026ce9b707ebb7a38..c04fccf8615b43163a83bc04e59376d98d4c5217 100644 (file)
@@ -3,23 +3,28 @@
 
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
-       $(GTK_CFLAGS) $(GNOMEUI_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 \
+       $(GTK_CFLAGS) $(GNOMEUI_CFLAGS)
 
 if WITH_GTK
-lib_LTLIBRARIES = libgvplugin_gtk.la
-endif
+noinst_LTLIBRARIES = libgvplugin_gtk_C.la
 
-libgvplugin_gtk_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined
+pkglib_LTLIBRARIES = libgvplugin_gtk.la
+endif
 
-libgvplugin_gtk_la_SOURCES = \
+libgvplugin_gtk_C_la_SOURCES = \
        gvplugin_gtk.c \
        gvdevice_gtk.c \
-       support.c support.h \
-        interface.c interface.h \
-        callbacks.c callbacks.h
+       support.c \
+        interface.c \
+        callbacks.c 
 
+libgvplugin_gtk_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined
+libgvplugin_gtk_la_SOURCES = $(libgvplugin_gtk_C_la_SOURCES)
 libgvplugin_gtk_la_LIBADD = $(GTK_LIBS) $(GNOMEUI_LIBS)
 
-CLEANFILES = *.BAK
-
 EXTRA_DIST = gtk.glade gtk.gladep
index 14b7aeb0d88238340560f10464c056f3779b25be..6ae63d2ba58fc8a15ae383c5da937058cc3e5f67 100644 (file)
@@ -29,7 +29,7 @@
 #include <string.h>
 #endif
 
-#include <gvplugin_device.h>
+#include "gvplugin_device.h"
 
 #include "callbacks.h"
 #include "interface.h"
index 7e0b880e2876d6d2cb729ae45711b40a0a5e1067..1b6b48cd391b8842780746d4088c72476d68dfeb 100644 (file)
@@ -20,7 +20,8 @@
 
 #include <stdint.h>
 #include <gtk/gtk.h>
-#include <gvplugin_device.h>
+
+#include "gvplugin_device.h"
 
 #include "interface.h"
 #include "support.h"