aboutsummaryrefslogtreecommitdiff
path: root/generic/Tabular.c
diff options
context:
space:
mode:
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
};