]> granicus.if.org Git - graphviz/commitdiff
fix loading of ps shapefiles with -ve BoundingBox coords
authorellson <devnull@localhost>
Fri, 26 Oct 2007 17:57:45 +0000 (17:57 +0000)
committerellson <devnull@localhost>
Fri, 26 Oct 2007 17:57:45 +0000 (17:57 +0000)
lib/common/usershape.h
plugin/core/gvloadimage_core.c

index cda6119728c6e46e1ccdf6709ab420cdc44ecb6e..3c6455476ce582085eaa1069743307c7a598c460 100644 (file)
@@ -38,7 +38,7 @@ extern "C" {
        FILE *f;
        imagetype_t type;
        char *stringtype;
-       unsigned int x, y, w, h, dpi;
+       int x, y, w, h, dpi;
        void *data;                   /* data loaded by a renderer */
        size_t datasize;              /* size of data (if mmap'ed) */
        void (*datafree)(usershape_t *us); /* renderer's function for freeing data */
index 12bfe3ce748393dc0049cacea1972ed9150f11bc..5ca4b1605273156731a58ffec35e087d067d028f 100644 (file)
@@ -197,7 +197,7 @@ static void core_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, boolean fill
 
     if (us->data) {
         fprintf(out, "gsave %g %g translate newpath\n",
-               b.LL.x - us->x, b.LL.y - us->y);
+               b.LL.x - (double)(us->x), b.LL.y - (double)(us->y));
         if (us->must_inline)
             epsf_emit_body(us, out);
         else