set demodir . lappend auto_path . package require newcanvas destroy .c pack [canvas .c -width 800 -height 600 -bg white -scrollregion {0 0 1 1} ] \ -anchor nw -fill both -expand 1 .c glenviron + BLEND ALPHA_TEST foreach i {fire fish tcllogo QS-Logo} { image create photo $i -file $::demodir/demo/$i.gif} .c create rectangle 260 50 550 100 -outline blue \ -anchor c -width 2 -fill {white black black white} .c create rectangle 130 100 800 250 -outline blue \ -anchor nw -width 2 -fill {red blue blue red} \ -rotation 5 -alpha 0.3 -smooth 1 .c create rectangle 200 300 600 400 -outline yellow -rotation -45 \ -anchor c -width 8 -fill {} .c create text 200 300 -fill {blue blue red red} -rotation -45 \ -anchor c -text {Upward and Onward, To Infinity and Beyond} \ -font {Helvetica 20} -scale {1 4} .c create image 150 500 -image fish -anchor c -tags {fish fish1} \ -width 300 -height 100 .c create image 740 200 -image fish -anchor c -tags {fish fish2} \ -width 100 -height 300 .c teximage paper $::demodir/demo/paperz.gif MODULATE .c teximage fire $::demodir/demo/fire.gif MODULATE .c teximage newspaper $::demodir/demo/newspaper1.gif MODULATE .c create image 800 600 -image QS-Logo -anchor se -tags qs \ -alpha 0.7 -fill {red red green green} .c textureconfigure QS-Logo MODULATE .c create text 350 200 -font {Helvetica 240} -tags Fire -text {FIRE} \ -anchor c -gltexture fire -fill white .c create image 0 0 -image tcllogo -height 600 -tags "image Logo" \ -fill {green green blue} -alpha 0.5 .c textureconfigure tcllogo MODULATE .c create image 0 0 -image fire -tile {20 0.1} -tags "image fire1" .c create image 0 600 -height 30 -width 800 -image fire -tags "image fire1" \ -anchor sw .c create rectangle 600 280 700 500 \ -gltexture paper -fill white .c create text 600 250 -font {Helvetica 300} -tags X -text {X} \ -anchor ne -fill {white green blue red} -gltexture paper \ -blend 1 .c create oval 400 250 700 500 -fill {} -outline red -width 4 .c create oval 700 400 800 500 -fill blue -start 45 -extent 90 .c create arc 700 300 800 600 -fill red -start 45 -extent 90 .c create arc 100 400 400 600 -outline black -style arc -start 0 \ -extent 180 -width 4 set f [open demo.txt r] ;set list [string trim [read $f]] ;close $f set index 0 ; set x [.c canvasx 5] ;set top [.c canvasy 5] foreach demo [split $list \n] { set id [.c create text $x $top -font {Helvetica 14} \ -text "[incr index]. $demo" -anchor nw] foreach {- y1 - y2} [.c bbox $id] {break} incr top [expr {$y2 - $y1}] if {$top > 580} { incr x 400 ; set top [.c canvasy 5] } } raise . .c togl render update idletasks update tcl3dWidget2File .c example2.jpg