Commit 22910050 authored by luc.moulinier's avatar luc.moulinier
Browse files


parent b7982dfd
......@@ -5936,6 +5936,21 @@ proc AjouteBoutonFeature {bt cmd} {
proc PrintOverview {w {format png}} {
set outfile [DemandeEtSauveFichier $format]
if {$outfile eq ""} {return}
set img [image create photo -format window -data $w]
$img write $outfile -format $format
image delete $img
proc PrintCanvas {canvas {format ""} {imageFile ""}} {
package require Img 1.3
......@@ -5991,13 +6006,13 @@ proc PrintCanvas {canvas {format ""} {imageFile ""}} {
## Take a screenshot of the visible canvas part...
image create photo ${image}_tmp \
-format window -data $canvas
-format window -data $canvas
## Copy the screenshot to the target image...
$image copy ${image}_tmp \
-to $image_x $image_y -from $border $border
-to $image_x $image_y -from $border $border
incr grabbed_x $view_width
incr image_x $view_width
image delete ${image}_tmp
set grabbed_x $x1
......@@ -6495,7 +6510,7 @@ proc AfficheFenetreOverview {Id} {
button $w.btn.btprt \
-text "Print" \
-background yellow \
-command [list PrintCanvas $wc png]
-command "PrintOverview $wc png"
button $w.btn.btclose \
-text "Close" \
-background green1 \
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment