aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/dirs1
-rw-r--r--generic/Arc.c21
-rw-r--r--generic/Curve.c22
-rw-r--r--generic/Group.c22
-rw-r--r--generic/Rectangle.c23
-rw-r--r--generic/tkZinc.c34
-rw-r--r--patchlvl.h2
7 files changed, 96 insertions, 29 deletions
diff --git a/debian/dirs b/debian/dirs
index cc79e04..7c1640c 100644
--- a/debian/dirs
+++ b/debian/dirs
@@ -2,5 +2,4 @@ usr/lib/python1.5/site-packages
usr/share/doc/zinc-tk/examples
usr/share/doc/zinc-tk/refman
usr/share/doc/zinc-perl
-usr/share/doc/zinc-python
usr/include
diff --git a/generic/Arc.c b/generic/Arc.c
index d64bb11..e50cd22 100644
--- a/generic/Arc.c
+++ b/generic/Arc.c
@@ -1726,6 +1726,25 @@ Coords(Item item,
return ZN_OK;
}
+/*
+ **********************************************************************************
+ *
+ * GetAnchor --
+ *
+ **********************************************************************************
+ */
+static void
+GetAnchor(Item item,
+ ZnAnchor anchor,
+ ZnPoint *p)
+{
+ ZnBBox *bbox = &item->item_bounding_box;
+
+ Origin2Anchor(&bbox->orig,
+ bbox->corner.x - bbox->orig.x,
+ bbox->corner.y - bbox->orig.y,
+ anchor, p);
+}
/*
**********************************************************************************
@@ -1760,7 +1779,7 @@ static ItemClassStruct ARC_ITEM_CLASS = {
Configure,
Query,
NULL, /* GetFieldSet */
- NULL, /* GetAnchor */
+ GetAnchor,
GetClipVertices,
GetContours,
Coords,
diff --git a/generic/Curve.c b/generic/Curve.c
index bad3de5..37567ac 100644
--- a/generic/Curve.c
+++ b/generic/Curve.c
@@ -2249,6 +2249,26 @@ PickVertex(Item item,
}
}
+/*
+ **********************************************************************************
+ *
+ * GetAnchor --
+ *
+ **********************************************************************************
+ */
+static void
+GetAnchor(Item item,
+ ZnAnchor anchor,
+ ZnPoint *p)
+{
+ ZnBBox *bbox = &item->item_bounding_box;
+
+ Origin2Anchor(&bbox->orig,
+ bbox->corner.x - bbox->orig.x,
+ bbox->corner.y - bbox->orig.y,
+ anchor, p);
+}
+
/*
**********************************************************************************
@@ -2269,7 +2289,7 @@ static ItemClassStruct CURVE_ITEM_CLASS = {
Configure,
Query,
NULL, /* GetFieldSet */
- NULL, /* GetAnchor */
+ GetAnchor,
GetClipVertices,
GetContours,
Coords,
diff --git a/generic/Group.c b/generic/Group.c
index 4305353..d020186 100644
--- a/generic/Group.c
+++ b/generic/Group.c
@@ -1590,6 +1590,26 @@ ZnGroupInsertItem(Item group,
ITEM.Invalidate(group, ZN_COORDS_FLAG);
}
+/*
+ **********************************************************************************
+ *
+ * GetAnchor --
+ *
+ **********************************************************************************
+ */
+static void
+GetAnchor(Item item,
+ ZnAnchor anchor,
+ ZnPoint *p)
+{
+ ZnBBox *bbox = &item->item_bounding_box;
+
+ Origin2Anchor(&bbox->orig,
+ bbox->corner.x - bbox->orig.x,
+ bbox->corner.y - bbox->orig.y,
+ anchor, p);
+}
+
/*
**********************************************************************************
@@ -1610,7 +1630,7 @@ static ItemClassStruct GROUP_ITEM_CLASS = {
Configure,
Query,
NULL, /* GetFieldSet */
- NULL, /* GetAnchor */
+ GetAnchor,
NULL, /* GetClipVertices */
NULL, /* GetContours */
Coords,
diff --git a/generic/Rectangle.c b/generic/Rectangle.c
index 7e18dbe..2552884 100644
--- a/generic/Rectangle.c
+++ b/generic/Rectangle.c
@@ -900,6 +900,27 @@ Coords(Item item,
/*
**********************************************************************************
*
+ * GetAnchor --
+ *
+ **********************************************************************************
+ */
+static void
+GetAnchor(Item item,
+ ZnAnchor anchor,
+ ZnPoint *p)
+{
+ ZnBBox *bbox = &item->item_bounding_box;
+
+ Origin2Anchor(&bbox->orig,
+ bbox->corner.x - bbox->orig.x,
+ bbox->corner.y - bbox->orig.y,
+ anchor, p);
+}
+
+
+/*
+ **********************************************************************************
+ *
* Exported functions struct --
*
**********************************************************************************
@@ -916,7 +937,7 @@ static ItemClassStruct RECTANGLE_ITEM_CLASS = {
Configure,
Query,
NULL, /* GetFieldSet */
- NULL, /* GetAnchor */
+ GetAnchor,
GetClipVertices,
NULL, /* GetContours */
Coords,
diff --git a/generic/tkZinc.c b/generic/tkZinc.c
index 696cb28..bdf14d2 100644
--- a/generic/tkZinc.c
+++ b/generic/tkZinc.c
@@ -1978,8 +1978,8 @@ ZnItemWithTagOrId(WidgetInfo *wi,
*
* Perform layouts on items. It can position items horizontally,
* vertically, along a path or with respect to a reference item.
- * It can also align on a grid and resize items to a common
- * reference.
+ * It can also align on a grid, evenly space items and resize
+ * items to a common reference.
*
*----------------------------------------------------------------------
*/
@@ -1991,16 +1991,14 @@ LayoutItems(WidgetInfo *wi,
int index, result;
Item item;
static CONST char *layout_cmd_strings[] = {
- "bbalign", "valign", "halign", "align",
- "position", "grid", "size", NULL
+ "align", "grid", "position", "scale", "space", NULL
};
enum layout_cmds {
- ZN_L_BBALIGN, ZN_L_VALIGN, ZN_L_HALIGN, ZN_L_ALIGN,
- ZN_L_POSITION, ZN_L_GRID, ZN_L_SIZE
+ ZN_L_ALIGN, ZN_L_GRID, ZN_L_POSITION, ZN_L_SCALE, ZN_L_SPACE
};
if (Tcl_GetIndexFromObj(wi->interp, args[0], layout_cmd_strings,
- "align command", 0, &index) != ZN_OK) {
+ "layout command", 0, &index) != ZN_OK) {
return ZN_ERROR;
}
switch((enum layout_cmds) index) {
@@ -2010,19 +2008,9 @@ LayoutItems(WidgetInfo *wi,
case ZN_L_ALIGN:
break;
/*
- * halign
- */
- case ZN_L_HALIGN:
- break;
- /*
- * valign
- */
- case ZN_L_VALIGN:
- break;
- /*
- * bbalign
+ * grid
*/
- case ZN_L_BBALIGN:
+ case ZN_L_GRID:
break;
/*
* position
@@ -2030,14 +2018,14 @@ LayoutItems(WidgetInfo *wi,
case ZN_L_POSITION:
break;
/*
- * grid
+ * scale
*/
- case ZN_L_GRID:
+ case ZN_L_SCALE:
break;
/*
- * size
+ * space
*/
- case ZN_L_SIZE:
+ case ZN_L_SPACE:
break;
}
diff --git a/patchlvl.h b/patchlvl.h
index dc4b88c..4ccf13a 100644
--- a/patchlvl.h
+++ b/patchlvl.h
@@ -9,5 +9,5 @@
#define ZINCVER 3
#define ZINCREV 2
#define ZINCPLVL 06
-#define ZINCVERSION "zinc-version-3206h"
+#define ZINCVERSION "zinc-version-3206i"
#endif