aboutsummaryrefslogtreecommitdiff
path: root/generic/Icon.c
diff options
context:
space:
mode:
authorlecoanet2002-07-05 14:31:44 +0000
committerlecoanet2002-07-05 14:31:44 +0000
commit1197f6f5c3740c9d60a1a8bdb54b13eb77789fbe (patch)
treea9032f03022ac07baa84ce5c4abfe4a95e7e14b3 /generic/Icon.c
parentfa5e1c8941f3ab1ef9fbf6fbdb491ca6db296111 (diff)
downloadtkzinc-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.c13
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);
}
}