in reply to Re^3: geoTiff Application Building
in thread geoTiff Application Building
UPDATE: I am receiving this error:#Draggability of window my $adj = Gtk2::Adjustment->new (1.00, 0.05, 5.00, 0.05, 0.50, 0.50); my $dragger = Gtk2::Ex::Dragger->new( widget => $scwin, hadjustment => $scwin->get_hadjustment, vadjustment => $scwin->get_vadjustment, #update_policy => 'continous', #cursor => 'hand1' ); #Setup zooming my $zoom = Gtk2::Label->new ("Zoom:"); $table->attach_defaults($zoom, 0, 1, 1, 2); $adj->signal_connect (value_changed => \&zoom_changed, $canvas); $zoom = Gtk2::SpinButton->new ($adj, 0.0, 2); $zoom->set_size_request (50, -1); $table->attach_defaults($zoom, 1, 2, 1, 2); #handle the events $canvas->signal_connect (event => \&event_handler); $window->show_all; Gtk2->main; #------------------------------------------------ sub event_handler { my ( $widget, $event ) = @_; # print $widget ,' ',$event->type,"\n"; #on 2 mouse presses, place waypoint if ( $event->type eq "2button-press" ) { print 'x->',$event->x,' ','y->',$event->y; #convert UTM to Lat and Long my $easting = $ps[0] * $event->x + 0.0 * $event->y + $mtp[3]; my $northing = (-$ps[1]) * $event->y + 0.0 * $event->x + $mtp[ +4]; my ($latitude,$longitude)=utm_to_latlon($ellipsoid,$zone,$east +ing,$northing); print " ($latitude, $longitude)\n"; #Drop icon my $tgroup = Gnome2::Canvas::Item->new ($root, 'Gnome2::Canvas +::Group', x => $event->x, y => $event->y); Gnome2::Canvas::Item->new($tgroup, 'Gnome2::Canvas::Ellipse', x1 => 0, y1 => 0, x2 => 10, y2 => 10, fill_color => 'purple', outline_color => 'black'); $tgroup->raise_to_top(); } #on mouse press, pan the window if ( $event->type eq "button-press" ) { $dragger->start ($event); } } #------------------------------------------------ sub zoom_changed { my ($adj, $canvas) = @_; $canvas->set_pixels_per_unit ($adj->value); }
Gdk-CRITICAL **: gdk_property_change: assertion `type != GDK_TARGET_ST +RING' fail ed at C:/camelbox/site/lib/Gtk2/Ex/SyncCall.pm line 62.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: geoTiff Application Building
by zentara (Cardinal) on Jun 01, 2008 at 11:02 UTC | |
by deadpickle (Pilgrim) on Jun 01, 2008 at 21:17 UTC | |
by zentara (Cardinal) on Jun 02, 2008 at 18:13 UTC | |
by zentara (Cardinal) on Jun 03, 2008 at 11:56 UTC |