]> granicus.if.org Git - graphviz/commitdiff
fix for #1475 - map area when: shape=none label="" image="node.png" href="foo"
authorellson <devnull@localhost>
Sat, 11 Oct 2008 22:10:26 +0000 (22:10 +0000)
committerellson <devnull@localhost>
Sat, 11 Oct 2008 22:10:26 +0000 (22:10 +0000)
lib/common/emit.c

index c60d3d6075af2fa94165273a44e82c936a0aabe7..81d61bd3bb5b764e7fa1afc9363f11e3a1e44279 100644 (file)
@@ -1108,15 +1108,14 @@ static void emit_begin_node(GVJ_t * job, node_t * n)
              */
             if ((nump < 4) || (nump > 60))
                 nump = DFLT_SAMPLE;
-            /* use bounding box of text label for mapping
+            /* use bounding box of text label or node image for mapping
              * when polygon has no peripheries and node is not filled
              */
             if (poly->peripheries == 0 && !filled) {
                 obj->url_map_shape = MAP_RECTANGLE;
                 nump = 2;
                 p = N_NEW(nump, pointf);
-                ldimen = ND_label(n)->dimen;
-                P2RECT(coord, p, ldimen.x / 2.0, ldimen.y / 2.0);
+                P2RECT(coord, p, ND_lw(n), ND_ht(n) / 2.0 );
             }
             /* circle or ellipse */
             else if (poly->sides < 3 && poly->skew == 0.0 && poly->distortion == 0.0) {