aboutsummaryrefslogtreecommitdiff
path: root/generic/Text.c
diff options
context:
space:
mode:
authorlecoanet2000-05-11 13:58:17 +0000
committerlecoanet2000-05-11 13:58:17 +0000
commitf0ebc4f3affbac34920f7be557312927e6cf8a81 (patch)
tree99f96d06ee7a903c1df7793802fcf337c14d45c5 /generic/Text.c
parent9663a916b72352db78f2d17d5268c1018904f967 (diff)
downloadtkzinc-f0ebc4f3affbac34920f7be557312927e6cf8a81.zip
tkzinc-f0ebc4f3affbac34920f7be557312927e6cf8a81.tar.gz
tkzinc-f0ebc4f3affbac34920f7be557312927e6cf8a81.tar.bz2
tkzinc-f0ebc4f3affbac34920f7be557312927e6cf8a81.tar.xz
Adaptation suite � la r�alisation des polygones multi-contours.
Diffstat (limited to 'generic/Text.c')
-rw-r--r--generic/Text.c24
1 files changed, 14 insertions, 10 deletions
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
};