aboutsummaryrefslogtreecommitdiff
path: root/generic/Icon.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/Icon.c')
-rw-r--r--generic/Icon.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/generic/Icon.c b/generic/Icon.c
index bd8c7e1..7a89753 100644
--- a/generic/Icon.c
+++ b/generic/Icon.c
@@ -669,24 +669,24 @@ GetAnchor(Item item,
*/
static ZnBool
GetClipVertices(Item item,
- ZnPoint **points,
- int *num_points)
+ ZnPoly *poly)
{
IconItem icon = (IconItem) item;
int w=0, h=0;
-
+ ZnPoint *points;
+
ZnListAssertSize(item->wi->work_pts, 2);
- *points = (ZnPoint *) ZnListArray(item->wi->work_pts);
- *num_points = 2;
if (icon->image != ZnUnspecifiedImage) {
Tk_SizeOfImage(icon->image, &w, &h);
}
else {
Tk_SizeOfBitmap(item->wi->dpy, icon->mask, &w, &h);
}
- (*points)[0] = icon->pos_dev;
- (*points)[1].x = icon->pos_dev.x + w;
- (*points)[1].y = icon->pos_dev.y + h;
+ points = (ZnPoint *) ZnListArray(item->wi->work_pts);
+ POLY_CONTOUR1(poly, points, 2);
+ points[0] = icon->pos_dev;
+ points[1].x = points[0].x + w;
+ points[1].y = points[0].y + h;
return True;
}
@@ -704,6 +704,7 @@ GetClipVertices(Item item,
*/
static int
Coords(Item item,
+ int contour,
int index,
int cmd,
ZnPoint **pts,
@@ -742,9 +743,9 @@ Coords(Item item,
*/
static ItemClassStruct ICON_ITEM_CLASS = {
sizeof(IconItemStruct),
- False,
- False,
- True,
+ False, /* has_fields */
+ False, /* has_parts */
+ True, /* has_anchors */
"icon",
icon_attrs,
Init,
@@ -752,15 +753,17 @@ static ItemClassStruct ICON_ITEM_CLASS = {
Destroy,
Configure,
Query,
- NULL,
+ NULL, /* GetFieldSet */
GetAnchor,
GetClipVertices,
Coords,
+ NULL, /* Contour */
ComputeCoordinates,
ToArea,
Draw,
IsSensitive,
Pick,
+ NULL, /* PickVertex */
PostScript
};