From 6a495d868f7fa7a0989f2fe7c30ce468496b2f10 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Tue, 21 Sep 2004 07:52:10 +0000 Subject: The various demos now use a central Tcl proc demosPath to obtain the path to the images and data. --- demos/groupsInAtcStrips.tcl | 4 ++-- demos/iconTransform.tcl | 2 +- demos/magicLens.tcl | 2 +- demos/photoAlpha.tcl | 4 ++-- demos/testGraphics.tcl | 2 +- demos/transforms.tcl | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'demos') diff --git a/demos/groupsInAtcStrips.tcl b/demos/groupsInAtcStrips.tcl index 5092ae0..3e8e5c7 100644 --- a/demos/groupsInAtcStrips.tcl +++ b/demos/groupsInAtcStrips.tcl @@ -55,7 +55,7 @@ namespace eval groupsInAtcStrips { wm iconname $w groupsInAtcStrips variable defaultfont [font create -family Helvetica -size 10 -weight bold] - variable imagePath [file join $zinc_library demos images] + variable imagePath [file join [demosPath] images] grid [button $w.dismiss -text Dismiss -command "destroy $w"] -row 2 -column 0 -pady 10 grid [button $w.code -text "See Code" -command "showCode $w"] -row 2 -column 1 -pady 10 @@ -83,7 +83,7 @@ namespace eval groupsInAtcStrips { # Zinc ########################################## image create photo texture -file \ - [file join $zinc_library demos images background_texture.gif] + [file join [demosPath] images background_texture.gif] grid [zinc $w.zinc -render 1 -width 700 -height 500 -borderwidth 0 \ -lightangle 130 -tile texture] -row 1 -column 0 -columnspan 2 -sticky news diff --git a/demos/iconTransform.tcl b/demos/iconTransform.tcl index cefffdb..e4527c8 100644 --- a/demos/iconTransform.tcl +++ b/demos/iconTransform.tcl @@ -46,7 +46,7 @@ namespace eval iconTransform { variable topGroup [$w.zinc add group 1] - image create photo zincAA -file [file join $zinc_library demos images zinc.gif] + image create photo zincAA -file [file join [demosPath] images zinc.gif] variable zincAA [$w.zinc add icon $topGroup -image zincAA \ -position {10 10} -composescale 1 -composerotation 1] diff --git a/demos/magicLens.tcl b/demos/magicLens.tcl index 0370579..c142d53 100644 --- a/demos/magicLens.tcl +++ b/demos/magicLens.tcl @@ -196,7 +196,7 @@ namespace eval magicLens { grid columnconfigure $w 1 -weight 1 grid rowconfigure $w 1 -weight 2 - variable imagePath [file join $zinc_library demos images] + variable imagePath [file join [demosPath] images] variable texture [image create photo -file [file join $imagePath paper-grey1.gif]] variable lensTexture [image create photo -file [file join $imagePath paper-grey.gif]] $zinc configure -tile $texture diff --git a/demos/photoAlpha.tcl b/demos/photoAlpha.tcl index 1d1b1b8..631c767 100644 --- a/demos/photoAlpha.tcl +++ b/demos/photoAlpha.tcl @@ -8,8 +8,8 @@ if {![info exists zincDemo]} { namespace eval photoAlpha { package require Img - variable girl [image create photo -file [file join $zinc_library demos images photoAlpha.png]] - variable texture [image create photo -file [file join $zinc_library demos images stripped_texture.gif]] + variable girl [image create photo -file [file join [demosPath] images photoAlpha.png]] + variable texture [image create photo -file [file join [demosPath] images stripped_texture.gif]] variable w .photoAlpha catch {destroy $w} diff --git a/demos/testGraphics.tcl b/demos/testGraphics.tcl index c8f7bbe..78502db 100644 --- a/demos/testGraphics.tcl +++ b/demos/testGraphics.tcl @@ -2047,7 +2047,7 @@ namespace eval testGraphics { -numpages 7 -overlap 2 -radius 8 \ -tabheight 26 -tabwidth {92 100 82 82 82 120 80}] break # to find some images (used as textures) needed by this demo - variable imagePath [file join $zinc_library demos images] + variable imagePath [file join [demosPath] images] variable texture [image create photo -file [file join $imagePath paper.gif]] # création des items zinc correspondants variable i 0 diff --git a/demos/transforms.tcl b/demos/transforms.tcl index 4eb5e16..679d583 100644 --- a/demos/transforms.tcl +++ b/demos/transforms.tcl @@ -71,7 +71,7 @@ namespace eval transforms { variable itemType Rectangle variable currentItem 0 - image create photo logo -file [file join $zinc_library demos images zinc.gif] + image create photo logo -file [file join [demosPath] images zinc.gif] grid [frame $w.f] -row 2 -column 0 -columnspan 2 -sticky w -- cgit v1.1