From: ellson Date: Tue, 20 Jun 2006 15:38:13 +0000 (+0000) Subject: make shape_desc available to loadimage X-Git-Tag: LAST_LIBGRAPH~32^2~6393 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7de88081d4ae3224fa172e30ec3aefabb754b329;p=graphviz make shape_desc available to loadimage --- diff --git a/lib/common/psgen.c b/lib/common/psgen.c index e24c5d43d..2c082ba32 100644 --- a/lib/common/psgen.c +++ b/lib/common/psgen.c @@ -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); diff --git a/plugin/core/gvloadimage_core.c b/plugin/core/gvloadimage_core.c index 4b68824e0..d3bbd8bcb 100644 --- a/plugin/core/gvloadimage_core.c +++ b/plugin/core/gvloadimage_core.c @@ -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;