aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlecoanet2001-03-30 12:19:59 +0000
committerlecoanet2001-03-30 12:19:59 +0000
commitca217c467bbedda643bd2c49455aaa3826d2f934 (patch)
tree9df54c2ca9d95849e04de4341d01d90201cb14ad
parent96295926362f1aa093d138ef25cef3505551e4fe (diff)
downloadtkzinc-ca217c467bbedda643bd2c49455aaa3826d2f934.zip
tkzinc-ca217c467bbedda643bd2c49455aaa3826d2f934.tar.gz
tkzinc-ca217c467bbedda643bd2c49455aaa3826d2f934.tar.bz2
tkzinc-ca217c467bbedda643bd2c49455aaa3826d2f934.tar.xz
*** empty log message ***
-rw-r--r--debian/changelog7
-rw-r--r--generic/Color.c13
-rw-r--r--patchlvl.h4
-rw-r--r--sandbox/testzinc.pl20
4 files changed, 36 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog
index 5a61f94..331be37 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+zinc-tk (3.1.26) unstable; urgency=low
+
+ * Correction de itemcget et itemconfigure afin qu'ils retournent
+ des tableaux perl et non des refs sur des tableaux.
+
+ -- Patrick Lecoanet <lecoanet@cena.dgac.fr> Fri, 30 Mar 2001 14:19:54 +0200
+
zinc-tk (3.1.25) unstable; urgency=low
* Retour arrière sur le traitement du grab lors d'un buttonpress.
diff --git a/generic/Color.c b/generic/Color.c
index 7958314..443a3e6 100644
--- a/generic/Color.c
+++ b/generic/Color.c
@@ -540,7 +540,9 @@ ZnGetColor(Tcl_Interp *interp,
if (XParseColor(dpy, colormap, name, &color) == 0) {
goto col_err;
}
+ /*printf("parsed color : %d %d %d\n", color.red, color.green, color.blue);*/
if (XAllocColor(dpy, colormap, &color) != 0) {
+ /*printf("alloced color : %d %d %d\n", color.red, color.green, color.blue);*/
DeleteStressedCmap(dpy, colormap);
}
else {
@@ -634,6 +636,13 @@ ZnGetColorByValue(Tk_Window tkwin,
tk_col->color.green = color->green;
tk_col->color.blue = color->blue;
if (XAllocColor(dpy, colormap, &tk_col->color) != 0) {
+ /*if (tk_col->color.red != color->red ||
+ tk_col->color.green != color->green ||
+ tk_col->color.blue != color->blue) {
+ printf("couleur allouée approximative %d %d %d --> %d %d %d\n",
+ tk_col->color.red, tk_col->color.green, tk_col->color.blue,
+ color->red, color->green, color->blue);
+ }*/
DeleteStressedCmap(dpy, colormap);
}
else {
@@ -968,7 +977,9 @@ RealizeColorGradient(ColorGradient *grad,
#if 1
else {
int red_range, green_range, blue_range;
-
+ /*printf("first color : %d %d %d, last color : %d %d %d\n",
+ first->red, first->green, first->blue,
+ last->red, last->green, last->blue);*/
red_range = (int) last->red - (int) first->red;
green_range = (int) last->green - (int) first->green;
blue_range = (int) last->blue - (int) first->blue;
diff --git a/patchlvl.h b/patchlvl.h
index 8f28d80..56c999e 100644
--- a/patchlvl.h
+++ b/patchlvl.h
@@ -11,6 +11,6 @@
#ifndef ZINCVERSION
#define ZINCVER 3
#define ZINCREV 1
-#define ZINCPLVL 25
-#define ZINCVERSION "zinc-version-3125"
+#define ZINCPLVL 26
+#define ZINCVERSION "zinc-version-3126"
#endif
diff --git a/sandbox/testzinc.pl b/sandbox/testzinc.pl
index 4d0a6f7..1e4bf90 100644
--- a/sandbox/testzinc.pl
+++ b/sandbox/testzinc.pl
@@ -160,10 +160,10 @@ sub create_tracks {
-filled => 0,
-backcolor => 'gray65',
-text => "Balise");
- my $b_on = sub { print_current($zinc);
+ my $b_on = sub { #print_current($zinc);
$zinc->itemconfigure('current', $zinc->currentpart(),
-border => 'contour')};
- my $b_off = sub { print_current($zinc);
+ my $b_off = sub { #print_current($zinc);
$zinc->itemconfigure('current', $zinc->currentpart(),
-border => 'noborder')};
my $tog_b = sub { my $current = $zinc->find('withtag', 'current');
@@ -181,7 +181,7 @@ sub create_tracks {
$zinc->bind($item, '<Shift-1>', sub {});
}
$zinc->bind($item, '<Enter>',
- sub {print_current($zinc);
+ sub { #print_current($zinc);
$zinc->itemconfigure('current',
-historycolor => 'red',
-symbolcolor => 'red',
@@ -191,7 +191,7 @@ sub create_tracks {
-speedvectorwidth => 2,
-speedvectorcolor => 'red')});
$zinc->bind($item, '<Leave>',
- sub {print_current($zinc);
+ sub { #print_current($zinc);
$zinc->itemconfigure('current',
-historycolor => 'black',
-symbolcolor => 'black',
@@ -210,7 +210,17 @@ create_tracks();
sub print_current {
my ($zinc) = @_;
- print join(' ', $zinc->find('withtag', 'current')), "\n";
+ my $current;
+
+ $current = $zinc->find('withtag', 'current');
+ print join(' ', $current), "\n";
+# print ref($zinc->itemcget($current, -position)) ? 'ref' : 'pas ref', "\n";
+# print 'tout ';
+# for $attr ($zinc->itemconfigure($current)) {
+# print (join(',', @$attr));
+# }
+# print "\n\n";
+# print '-position ', join(',', $zinc->itemconfigure($current, -position)), "\n\n";
}
###################################################