aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlecoanet2007-03-06 09:28:05 +0000
committerlecoanet2007-03-06 09:28:05 +0000
commit8b027be4dc4bcb8fcdb2744e0d8fc65734bb206a (patch)
treeae6e1c153bc6e0492a63f0854f8fb85da352125a
parent52f0d1e6fdc4899c912a2808ecfbf1499e932e05 (diff)
downloadtkzinc-8b027be4dc4bcb8fcdb2744e0d8fc65734bb206a.zip
tkzinc-8b027be4dc4bcb8fcdb2744e0d8fc65734bb206a.tar.gz
tkzinc-8b027be4dc4bcb8fcdb2744e0d8fc65734bb206a.tar.bz2
tkzinc-8b027be4dc4bcb8fcdb2744e0d8fc65734bb206a.tar.xz
Update aclocal fo GLEW
-rw-r--r--Perl/demos/Tk/demos/zinc_lib/simpleradar.pl12
-rw-r--r--aclocal.m48
-rwxr-xr-xconfigure8
-rw-r--r--demos/simpleRadar.tcl19
4 files changed, 34 insertions, 13 deletions
diff --git a/Perl/demos/Tk/demos/zinc_lib/simpleradar.pl b/Perl/demos/Tk/demos/zinc_lib/simpleradar.pl
index 12c45a9..06cec3c 100644
--- a/Perl/demos/Tk/demos/zinc_lib/simpleradar.pl
+++ b/Perl/demos/Tk/demos/zinc_lib/simpleradar.pl
@@ -52,7 +52,9 @@ my $rate = 0.3;
my %tracks = ();
my $pause = 0; # if true the flight are no more moving
-my $zinc = $mw->Zinc(-backcolor => 'gray65',
+my $zinc = $mw->Zinc(-render => 1,
+ -enablerotation => 1,
+ -backcolor => 'gray65',
-relief => 'sunken',
-font => "10x20");
$zinc->pack(-expand => 1, -fill => 'both');
@@ -61,6 +63,9 @@ $zinc->configure(-width => $zinc_width, -height => $zinc_height);
my $radar = $zinc->add('group', $top, -tags => ['controls', 'radar']);
$zinc->configure(-overlapmanager => $radar);
+my $rotation = 0;
+$zinc->Tk::bind('<Alt-1>', sub { $rotation += 10; $zinc->configure(-screenrotation => $rotation); });
+$zinc->Tk::bind('<Alt-3>', sub { $rotation -= 10; $zinc->configure(-screenrotation => $rotation); });
###################################################
# creation panneau controle
@@ -127,7 +132,10 @@ sub update_transform {
$zinc->translate($top, -$center_x, -$center_y);
$zinc->scale($top, $scale, $scale);
$zinc->scale($top, 1, -1);
- $zinc->translate($top, $zinc_width/2, $zinc_height/2);
+ my $virtualSize = sqrt($zinc_width*$zinc_width + $zinc_height*$zinc_height);
+ my $hVirtualSize = $virtualSize/2;
+ $zinc->translate($top, $hVirtualSize, $hVirtualSize);
+ #$zinc->translate($top, $zinc_width/2, $zinc_height/2);
}
diff --git a/aclocal.m4 b/aclocal.m4
index d76c1c7..0c0fda9 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -57,11 +57,11 @@ AC_DEFUN(ZINC_ENABLE_GL, [
if test "${TEA_PLATFORM}" = "windows" ; then
GL_LIBS="${GLEW_LIB}/libglew32.a -lglu32 -lopengl32"
elif test "${TEA_WINDOWINGSYSTEM}" = "aqua" ; then
- GL_LIBS='-lGLEW -framework AGL -framework OpenGL'
- GL_INCLUDES=''
+ GL_LIBS="-L${GLEW_LIB} -lGLEW -framework AGL -framework OpenGL"
+ GL_INCLUDES="${GL_INCLUDES}"
else
- GL_LIBS='-lGLEW -lGL'
- GL_INCLUDES='-I/usr/include'
+ GL_LIBS="-L${GLEW_LIB} -lGLEW -lGL"
+ GL_INCLUDES="${GL_INCLUDES} -I/usr/include"
fi
AC_DEFINE(GL)
diff --git a/configure b/configure
index 8d8fa52..3e50fd6 100755
--- a/configure
+++ b/configure
@@ -11145,11 +11145,11 @@ echo "${ECHO_T}no" >&6
if test "${TEA_PLATFORM}" = "windows" ; then
GL_LIBS="${GLEW_LIB}/libglew32.a -lglu32 -lopengl32"
elif test "${TEA_WINDOWINGSYSTEM}" = "aqua" ; then
- GL_LIBS='-lGLEW -framework AGL -framework OpenGL'
- GL_INCLUDES=''
+ GL_LIBS="-L${GLEW_LIB} -lGLEW -framework AGL -framework OpenGL"
+ GL_INCLUDES="${GL_INCLUDES}"
else
- GL_LIBS='-lGLEW -lGL'
- GL_INCLUDES='-I/usr/include'
+ GL_LIBS="-L${GLEW_LIB} -lGLEW -lGL"
+ GL_INCLUDES="${GL_INCLUDES} -I/usr/include"
fi
cat >>confdefs.h <<\_ACEOF
diff --git a/demos/simpleRadar.tcl b/demos/simpleRadar.tcl
index 15df644..f940a85 100644
--- a/demos/simpleRadar.tcl
+++ b/demos/simpleRadar.tcl
@@ -7,6 +7,7 @@ if {![info exists zincDemo]} {
}
namespace eval simpleRadar {
+ variable rotation 0
variable w .simpleRadar
catch {destroy $w}
toplevel $w
@@ -23,7 +24,7 @@ namespace eval simpleRadar {
Click Button 2 for identifiying the closest item (result in the terminal).
Button 3 for dragging most items, but not the ministrip (not in the same group).
Shift-Button 3 for zooming independently on X and Y axis.
- Ctrl-Button 3 for rotationg graphic objects.
+ Ctrl-Button 3 for rotating graphic objects.
Enter/Leave in flight label fields, speed vector, position and leader,
and in the ministrip fields.
Click Button 1 on flight track to display a route.}
@@ -45,13 +46,23 @@ namespace eval simpleRadar {
# if true the flights are no more moving
variable pause 0
- zinc $w.zinc -backcolor gray65 -relief sunken -font 10x20 \
- -width $zincWidth -height $zincHeight
+# zinc $w.zinc -render 1 -enablerotation 1 -backcolor gray65 -relief sunken -font 10x20 \
+# -width $zincWidth -height $zincHeight
+ zinc $w.zinc -render 1 -backcolor gray65 -relief sunken -font 10x20 \
+ -width $zincWidth -height $zincHeight
pack $w.zinc -expand 1 -fill both
$w.zinc add group $top -tags {controls radar}
$w.zinc configure -overlapmanager [$w.zinc find withtag radar]
+# bind $w.zinc <Alt-1> {
+# incr ::simpleRadar::rotation 10
+# %W configure -screenrotation $::simpleRadar::rotation
+# }
+# bind $w.zinc <Alt-3> {
+# incr ::simpleRadar::rotation -10
+# %W configure -screenrotation $::simpleRadar::rotation
+# }
#-------------------------------------------------
# Create control panel
@@ -152,6 +163,8 @@ namespace eval simpleRadar {
$z translate 1 [expr -$centerX] [expr -$centerY]
$z scale 1 $scale $scale
$z scale 1 1 -1
+# set hVirtualSize [expr hypot($zincWidth, $zincHeight)/2]
+# $z translate 1 $hVirtualSize $hVirtualSize
$z translate 1 [expr $zincWidth/2] [expr $zincHeight/2]
}