REBOL [ Title: "Zoom into Images" Date: 24-April-2001 Version: 0.2.0 File: %zoom-img.r Home: http://www.ross-gill.com/ Author: "Christopher Ross-Gill" Rights: "Copyright ©2001 Christopher Ross-Gill" Purpose: "Zoom in to images" History: { 0.1.0 Crude but it works. 0.2.0 It's inside the 'layout now. } Comments: { A fun video-style zoom technique using 'crop and 'fit. Why? Because I can achieve the effect by only loading one image (or two for two examples) and this minimal source code. } ] img: load-image http://www.ross-gill.com/files/castle-flag.jpg img2: load-image http://www.ross-gill.com/files/goatfell-jura.jpg count: 0 view layout compose [ size 240x180 at 0x0 img-face: image img 240x180 effect [fit] rate 10 feel [ engage: func [face action event][ if action = 'time [ switch count [ 0 [ os: 0x0 os-inc: 2x0 cp: img/size ] 10 [ txt/text: {ams presents} show txt ] 50 [ txt/text: {} show txt face/image: img2 os: 0x0 os-inc: 0x0 cp: img/size ] 60 [ txt/text: {'The Isle of Arran'} show txt ] 100 [ face/rate: none unview/all do http://www.ross-gill.com/arran.r ] ] face/effect: compose [ crop (os: os + os-inc) (cp: cp - 2x1) fit ] show face count: count + 1 ] ] ] at 10x40 txt: banner "" 220x40 white ]