From f0ebc4f3affbac34920f7be557312927e6cf8a81 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Thu, 11 May 2000 13:58:17 +0000 Subject: Adaptation suite � la r�alisation des polygones multi-contours. --- generic/Text.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'generic/Text.c') diff --git a/generic/Text.c b/generic/Text.c index b01348b..187a228 100644 --- a/generic/Text.c +++ b/generic/Text.c @@ -845,14 +845,15 @@ GetAnchor(Item item, */ static ZnBool GetClipVertices(Item item, - ZnPoint **points, - int *num_points) + ZnPoly *poly) { + ZnPoint *points; + ZnListAssertSize(item->wi->work_pts, 2); - *points = (ZnPoint *) ZnListArray(item->wi->work_pts); - *num_points = 2; - (*points)[0] = item->item_bounding_box.orig; - (*points)[1] = item->item_bounding_box.corner; + points = (ZnPoint *) ZnListArray(item->wi->work_pts); + POLY_CONTOUR1(poly, points, 2); + points[0] = item->item_bounding_box.orig; + points[1] = item->item_bounding_box.corner; return True; } @@ -870,6 +871,7 @@ GetClipVertices(Item item, */ static int Coords(Item item, + int contour, int index, int cmd, ZnPoint **pts, @@ -908,9 +910,9 @@ Coords(Item item, */ static ItemClassStruct TEXT_ITEM_CLASS = { sizeof(TextItemStruct), - False, - False, - True, + False, /* has_fields */ + False, /* has_parts */ + True, /* has_anchors */ "text", text_attrs, Init, @@ -918,15 +920,17 @@ static ItemClassStruct TEXT_ITEM_CLASS = { Destroy, Configure, Query, - NULL, + NULL, /* GetFieldSet */ GetAnchor, GetClipVertices, Coords, + NULL, /* Contour */ ComputeCoordinates, ToArea, Draw, IsSensitive, Pick, + NULL, /* PickVertex */ PostScript }; -- cgit v1.1