aboutsummaryrefslogtreecommitdiff
path: root/generic/Icon.c
diff options
context:
space:
mode:
authorlecoanet2001-11-26 10:24:04 +0000
committerlecoanet2001-11-26 10:24:04 +0000
commit87baed1fb08207991480eaf3d474530df5ef8ee1 (patch)
treea899caeec6f1b9cce1443ef50a5ebcadbebae12f /generic/Icon.c
parentf11d2fb3812281c49f7a5c0d45690bef8922875a (diff)
downloadtkzinc-87baed1fb08207991480eaf3d474530df5ef8ee1.zip
tkzinc-87baed1fb08207991480eaf3d474530df5ef8ee1.tar.gz
tkzinc-87baed1fb08207991480eaf3d474530df5ef8ee1.tar.bz2
tkzinc-87baed1fb08207991480eaf3d474530df5ef8ee1.tar.xz
Adaptation pour le clipping non rectangulaire
Diffstat (limited to 'generic/Icon.c')
-rw-r--r--generic/Icon.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/Icon.c b/generic/Icon.c
index 6b3ce64..94e7bec 100644
--- a/generic/Icon.c
+++ b/generic/Icon.c
@@ -695,12 +695,13 @@ GetAnchor(Item item,
*
* GetClipVertices --
* Get the clipping shape.
+ * Never ever call TRI_FREE on the tristrip returned by GetClipVertices.
*
**********************************************************************************
*/
static ZnBool
-GetClipVertices(Item item,
- ZnPoly *poly)
+GetClipVertices(Item item,
+ ZnTriStrip *tristrip)
{
IconItem icon = (IconItem) item;
int w=0, h=0;
@@ -714,7 +715,7 @@ GetClipVertices(Item item,
Tk_SizeOfBitmap(item->wi->dpy, icon->mask, &w, &h);
}
points = (ZnPoint *) ZnListArray(item->wi->work_pts);
- POLY_CONTOUR1(poly, points, 2);
+ TRI_STRIP1(tristrip, points, 2);
points[0] = icon->pos_dev;
points[1].x = points[0].x + w;
points[1].y = points[0].y + h;
@@ -787,6 +788,7 @@ static ItemClassStruct ICON_ITEM_CLASS = {
NULL, /* GetFieldSet */
GetAnchor,
GetClipVertices,
+ NULL, /* GetContours */
Coords,
NULL, /* InsertChars */
NULL, /* DeleteChars */