aboutsummaryrefslogtreecommitdiff
path: root/generic/Tabular.c
diff options
context:
space:
mode:
authorlecoanet2000-05-11 13:58:17 +0000
committerlecoanet2000-05-11 13:58:17 +0000
commitf0ebc4f3affbac34920f7be557312927e6cf8a81 (patch)
tree99f96d06ee7a903c1df7793802fcf337c14d45c5 /generic/Tabular.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/Tabular.c')
-rw-r--r--generic/Tabular.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/generic/Tabular.c b/generic/Tabular.c
index 0385203..6f40926 100644
--- a/generic/Tabular.c
+++ b/generic/Tabular.c
@@ -426,23 +426,22 @@ GetAnchor(Item item,
*/
static ZnBool
GetClipVertices(Item item,
- ZnPoint **points,
- int *num_points)
+ ZnPoly *poly)
{
FieldSet field_set = &((TabularItem) item)->field_set;
- ZnDim width, height;
+ ZnDim width, height;
+ ZnPoint *points;
- *points = NULL;
- *num_points = 0;
+ poly->num_contours = 0;
if (field_set->label_format) {
ITEM_P.GetLabelBBox(field_set, &width, &height);
ZnListAssertSize(item->wi->work_pts, 2);
- *points = (ZnPoint *) ZnListArray(item->wi->work_pts);
- *num_points = 2;
- (*points)[0] = field_set->label_pos;
- (*points)[1].x = field_set->label_pos.x + width;
- (*points)[1].y = field_set->label_pos.y + height;
+ points = (ZnPoint *) ZnListArray(item->wi->work_pts);
+ POLY_CONTOUR1(poly, points, 2);
+ points[0] = field_set->label_pos;
+ points[1].x = points[0].x + width;
+ points[1].y = points[0].y + height;
}
return True;
@@ -461,6 +460,7 @@ GetClipVertices(Item item,
*/
static int
Coords(Item item,
+ int contour,
int index,
int cmd,
ZnPoint **pts,
@@ -499,9 +499,9 @@ Coords(Item item,
*/
static ItemClassStruct TABULAR_ITEM_CLASS = {
sizeof(TabularItemStruct),
- True,
- False,
- True,
+ True, /* has_fields */
+ False, /* has_parts */
+ True, /* has_anchors */
"tabular",
tabular_attrs,
Init,
@@ -513,11 +513,13 @@ static ItemClassStruct TABULAR_ITEM_CLASS = {
GetAnchor,
GetClipVertices,
Coords,
+ NULL, /* Contour */
ComputeCoordinates,
ToArea,
Draw,
IsSensitive,
Pick,
+ NULL, /* PickVertex */
PostScript
};