diff options
author | lecoanet | 2002-07-05 14:31:44 +0000 |
---|---|---|
committer | lecoanet | 2002-07-05 14:31:44 +0000 |
commit | 1197f6f5c3740c9d60a1a8bdb54b13eb77789fbe (patch) | |
tree | a9032f03022ac07baa84ce5c4abfe4a95e7e14b3 /generic/Icon.c | |
parent | fa5e1c8941f3ab1ef9fbf6fbdb491ca6db296111 (diff) | |
download | tkzinc-1197f6f5c3740c9d60a1a8bdb54b13eb77789fbe.zip tkzinc-1197f6f5c3740c9d60a1a8bdb54b13eb77789fbe.tar.gz tkzinc-1197f6f5c3740c9d60a1a8bdb54b13eb77789fbe.tar.bz2 tkzinc-1197f6f5c3740c9d60a1a8bdb54b13eb77789fbe.tar.xz |
* (GetAnchor): Correction du calcul des ancres qui ne
tenait pas compte du resize/rotate. Par contre on se
limite volontairement � la bbox et non au rectangle
effectif de l'image.
Diffstat (limited to 'generic/Icon.c')
-rw-r--r-- | generic/Icon.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/generic/Icon.c b/generic/Icon.c index 67224e2..b8d003d 100644 --- a/generic/Icon.c +++ b/generic/Icon.c @@ -628,19 +628,16 @@ GetAnchor(Item item, ZnPoint *p) { IconItem icon = (IconItem) item; - int w=0, h=0; if (icon->image == ZnUnspecifiedImage) { *p = *icon->dev; } else { - ZnSizeOfImage(icon->image, &w, &h); - if (item->wi->render) { - Origin2Anchor(&item->item_bounding_box.orig, w, h, anchor, p); - } - else { - Origin2Anchor(icon->dev, w, h, anchor, p); - } + ZnBBox *bbox = &item->item_bounding_box; + Origin2Anchor(&bbox->orig, + bbox->corner.x - bbox->orig.x, + bbox->corner.y - bbox->orig.y, + anchor, p); } } |