]> granicus.if.org Git - graphviz/commitdiff
make shape_desc available to loadimage
authorellson <devnull@localhost>
Tue, 20 Jun 2006 15:38:13 +0000 (15:38 +0000)
committerellson <devnull@localhost>
Tue, 20 Jun 2006 15:38:13 +0000 (15:38 +0000)
lib/common/psgen.c
plugin/core/gvloadimage_core.c

index e24c5d43d4c29e3f2ad204b55b25a1f0c6269712..2c082ba32d6be203fcf03673ee9d1740d70e26ad 100644 (file)
@@ -539,11 +539,16 @@ static void ps_freeimage_ps (usershape_t *us)
 static void ps_usershape(usershape_t *us, boxf b, point *A, int n, bool filled)
 {
     int j;
+    shape_desc *shape;
+
+    assert(us);
+    assert(us->name);
+
     if (S[SP].invis)
        return;
 
     if (!us->f) {
-        if (us->data) { /* if we found the shape in a library then us->data was set */
+        if ((shape = (shape_desc*)us->data)) { /* if we found the shape in a library then us->data was set */
            if (filled) {
                ps_begin_context();
                ps_set_color(S[SP].fillcolor);
index 4b68824e0ed453da3c98e5f2ae05e27b2456c04c..d3bbd8bcb8c89fa374f8ab75f42265b5d6cbce52 100644 (file)
@@ -136,6 +136,7 @@ static void core_loadimage_pslib(GVJ_t * job, usershape_t *us, boxf b, bool fill
     int i;
     pointf AF[4];
     FILE *out;
+    shape_desc *shape;
 
     assert(job);
     assert(us);
@@ -145,7 +146,7 @@ static void core_loadimage_pslib(GVJ_t * job, usershape_t *us, boxf b, bool fill
     out = job->output_file;
     assert(out);
 
-    if (us->data) { /* if us->name was found in a library, then us->data was set */
+    if ((shape = (shape_desc*)us->data)) {
        AF[0] = b.LL;
        AF[2] = b.UR;
        AF[1].x = AF[0].x;