aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlecoanet2001-11-26 10:29:24 +0000
committerlecoanet2001-11-26 10:29:24 +0000
commit168da20e4c3a6f298cba04b06759eb1a29ce2058 (patch)
treed9f7bc7fb8a553a8e750ac964e2751d117796210
parent022119cc3148d63f6504ca340dca2eb115033d3a (diff)
downloadtkzinc-168da20e4c3a6f298cba04b06759eb1a29ce2058.zip
tkzinc-168da20e4c3a6f298cba04b06759eb1a29ce2058.tar.gz
tkzinc-168da20e4c3a6f298cba04b06759eb1a29ce2058.tar.bz2
tkzinc-168da20e4c3a6f298cba04b06759eb1a29ce2058.tar.xz
*** empty log message ***
-rw-r--r--debian/changelog8
-rw-r--r--generic/Geo.h7
-rw-r--r--generic/Item.h6
-rw-r--r--generic/Map.c1
-rw-r--r--generic/Reticle.c1
-rw-r--r--patchlvl.h4
-rw-r--r--sandbox/local.pl20
-rw-r--r--sandbox/testshape.tcl20
8 files changed, 47 insertions, 20 deletions
diff --git a/debian/changelog b/debian/changelog
index 62630d1..f854f4b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+zinc-tk (3.2.2) unstable; urgency=low
+
+ * Ajout du clipping non rectangulaire.
+ * Gradient PATH
+ * Correction d'un bug de binding Enter/Leave dans item.
+
+ -- Patrick Lecoanet <lecoanet@ath.cena.fr> Mon, 26 Nov 2001 11:29:08 +0100
+
zinc-tk (3.2.1) unstable; urgency=low
* Correction d'un core dump dans clonage de curve.
diff --git a/generic/Geo.h b/generic/Geo.h
index 2b11414..bac8166 100644
--- a/generic/Geo.h
+++ b/generic/Geo.h
@@ -82,7 +82,12 @@ POLY_SET(ZnPoly *poly1,
ZnPoly *poly2);
void
POLY_FREE(ZnPoly *poly);
-
+void
+TRI_STRIP1(ZnTriStrip *tristrip,
+ ZnPoint *pts,
+ int num_pts);
+void
+TRI_FREE(ZnTriStrip *tristrip);
void
Anchor2Origin(ZnPoint *position,
diff --git a/generic/Item.h b/generic/Item.h
index d3d0bf0..16a624a 100644
--- a/generic/Item.h
+++ b/generic/Item.h
@@ -163,7 +163,8 @@ typedef void (*ItemContourMethod)(Item item, int cmd, ZnPoly *poly);
typedef void (*ItemPickVertexMethod)(Item item, ZnPoint *p, int *contour,
int *vertex, int *o_vertex);
typedef void (*ItemGetAnchorMethod)(Item item, ZnAnchor anchor, ZnPoint *p);
-typedef ZnBool (*ItemGetClipVerticesMethod)(Item item, ZnPoly *points);
+typedef ZnBool (*ItemGetClipVerticesMethod)(Item item, ZnTriStrip *tristrip);
+typedef ZnBool (*ItemGetContoursMethod)(Item item, ZnPoly *poly);
typedef int (*ItemCoordsMethod)(Item item, int contour, int index, int cmd,
ZnPoint **points, int *num_points);
typedef void (*ItemInsertCharsMethod)(Item item, int index, char *chars);
@@ -191,6 +192,7 @@ typedef struct _ItemClassStruct {
ItemGetFieldSetMethod GetFieldSet;
ItemGetAnchorMethod GetAnchor;
ItemGetClipVerticesMethod GetClipVertices;
+ ItemGetContoursMethod GetContours;
ItemCoordsMethod Coords;
ItemInsertCharsMethod InsertChars;
ItemDeleteCharsMethod DeleteChars;
@@ -286,7 +288,7 @@ extern struct _ITEM_P {
void (*InitClipStack)(struct _WidgetInfo *wi);
void (*FreeClipStack)(struct _WidgetInfo *wi);
void (*ResetClipStack)(struct _WidgetInfo *wi);
- void (*PushClip)(struct _WidgetInfo *wi, ZnPoly *poly, ZnBool simple,
+ void (*PushClip)(struct _WidgetInfo *wi, ZnTriStrip *tristrip, ZnBool simple,
ZnBool set_gc);
void (*PopClip)(struct _WidgetInfo *wi, ZnBool set_gc);
ZnBool (*CurrentClip)(struct _WidgetInfo *wi, Region *reg, ZnBBox **clip_box,
diff --git a/generic/Map.c b/generic/Map.c
index 12d953a..d7aee0a 100644
--- a/generic/Map.c
+++ b/generic/Map.c
@@ -1577,6 +1577,7 @@ static ItemClassStruct MAP_ITEM_CLASS = {
NULL, /* GetFieldSet */
NULL, /* GetAnchor */
NULL, /* GetClipVertices */
+ NULL, /* GetContours */
Coords,
NULL, /* InsertChars */
NULL, /* DeleteChars */
diff --git a/generic/Reticle.c b/generic/Reticle.c
index 31ea083..8ee24ae 100644
--- a/generic/Reticle.c
+++ b/generic/Reticle.c
@@ -587,6 +587,7 @@ static ItemClassStruct RETICLE_ITEM_CLASS = {
NULL, /* GetFieldSet */
NULL, /* GetAnchor */
NULL, /* GetClipVertices */
+ NULL, /* GetContours */
Coords,
NULL, /* InsertChars */
NULL, /* DeleteChars */
diff --git a/patchlvl.h b/patchlvl.h
index c1177af..27fdf35 100644
--- a/patchlvl.h
+++ b/patchlvl.h
@@ -11,6 +11,6 @@
#ifndef ZINCVERSION
#define ZINCVER 3
#define ZINCREV 2
-#define ZINCPLVL 01
-#define ZINCVERSION "zinc-version-3201"
+#define ZINCPLVL 02
+#define ZINCVERSION "zinc-version-3202"
#endif
diff --git a/sandbox/local.pl b/sandbox/local.pl
index 30bed65..94f1fa5 100644
--- a/sandbox/local.pl
+++ b/sandbox/local.pl
@@ -19,7 +19,8 @@ $zinc = $mw->Zinc(-render => 1,
$zinc->pack(-expand => 1, -fill => 'both');
$zinc->configure(-width => 500, -height => 500);
$gr1 = $zinc->add('group', $top);
-$clip = $zinc->add('rectangle', $gr1, [50, 50, 399, 399],
+#$clip = $zinc->add('rectangle', $gr1, [50, 50, 399, 399],
+$clip = $zinc->add('arc', $gr1, [50, 50, 399, 399],
-filled => 1,
-fillcolor => 'Pink:40',
# -fillpattern => 'AlphaStipple4',
@@ -52,10 +53,11 @@ $rect = $zinc->add('rectangle', $view, [100, 100, 200, 200],
# -fillcolor => 'pink:50',
-fillcolor => 'tan',
-relief => 'sunken',
- -filled => 1);
+ -filled => 1
+ );
$mp = $zinc->add('curve', $view, [50, 50, 100, 150, 270, 70,
- 220, 0, 200, 20, 180, -100,
+ 220, 0, 200, 0, 180, -100,
140, 40, 70, -100],
-visible => 1,
-composescale => 1,
@@ -67,7 +69,7 @@ $mp = $zinc->add('curve', $view, [50, 50, 100, 150, 270, 70,
-linecolor => 'black',
-linealpha => 50,
-filled => 1,
- -fillcolor => 'white|black(10 10',
+ -fillcolor => 'white|black[100 100',
# -fillcolor => 'white',
# -fillpattern => 'AlphaStipple8',
# -tile => $papier,
@@ -122,9 +124,11 @@ $fvwm = $zinc->add('icon', $top,
-color => 'orange',
-alpha => 100);
+#$zinc->gname('white 0 80|black[0 0', 'cone');
$zinc->gname('white:50 0 80|black 30|white 100(0 0', 'oeil');
$zinc->gname('white:100|black:100(-20 -15', 'boule');
$zinc->gname('white:100|black:100(-15 -100', 'arrondi');
+$zinc->gname('white:100|black:100/45', 'cyl');
$arc = $zinc->add('arc', $view, [-45, -45, 45, 45],
-visible => 1,
-fillcolor => 'boule',
@@ -136,6 +140,12 @@ $arc = $zinc->add('arc', $view, [-45, -45, 45, 45],
# -tile => $logo,
-pieslice => 0
);
+$zinc->add('rectangle', $view, [100, 100, 200, 200],
+ -fillcolor => 'cyl',
+ -linewidth => 1,
+ -filled => 1,
+ -visible => 0
+ );
$zinc->translate($arc, 125, 300);
@@ -168,6 +178,8 @@ $zinc->translate($rect, -150, -150);
$zinc->rotate($rect, 35);
$zinc->translate($rect, 150, 150);
+$zinc->monitor(1);
+$mw->Tk::bind('<p>', sub { print "perfs: ", join(',', $zinc->monitor()), "\n" });
$mw->Tk::bind('<t>', sub { $zinc->remove($arc); });
$mw->Tk::bind('<q>', sub { exit(0); });
diff --git a/sandbox/testshape.tcl b/sandbox/testshape.tcl
index 424d057..b0a5b6d 100644
--- a/sandbox/testshape.tcl
+++ b/sandbox/testshape.tcl
@@ -1,20 +1,18 @@
-#!/usr/bin/wish -f
+#!/usr/bin/wish8.0 -f
-load tkzinc3.1.so
+load /pii/packages/common/zinc/tkzinc_debug3.2.so
set top 1
-set r [zinc .r]
+set r [zinc .r -render 0 -borderwidth 0 -fullreshape 0 -relief sunken]
pack $r -expand t -fill both
-$r configure -width 800 -height 500
+$r configure -width 500 -height 500
-set view [$r add group $top]
+set arc [.r add arc $top "50 50 200 150" -visible 1 -closed 0 -filled 0 -fillcolor white -extent 200 -pieslice 0]
-set tab1 [$r add tabular $view 10 -position "100 100" -labelformat "100x30"]
-set tab2 [$r add tabular $view 10 -position "100 150" -labelformat "100x30"]
-set tab3 [$r add tabular $view 10 -connecteditem $tab2 -labelformat "100x30"]
+set cv [.r add curve $top "50 50 100 150 270 70 220 0 200 20 180 -100 140 40 70 -100" \
+ -visible 0]
-$r itemconfigure $tab1 0 -text "tab1"
-$r itemconfigure $tab2 0 -text "tab2"
-$r itemconfigure $tab3 0 -text "tab3"
+.r rotate $arc [expr 3.14/10] 125 100
+.r itemconfigure $top -clip $cv