#!/bin/sh # MetaCard 2.4 stack # The following is not ASCII text, # so now would be a good time to q out of more exec mc $0 "$@" Core Image Visual Effects on preOpenStack set the label of button "Effect Name" to "CIRippleTransition" go to card "CIRippleTransition" end preOpenStack on preOpenCard createCIControls end preOpenCard on createCIControls if there is no group "ciControls" of this card of me then exit createCIControls end if repeat while the number of controls of group "ciControls" of this card of me > 0 delete control 1 of group "ciControls" of this card of me end repeat local tSpec, tControl, tTop, tLeft set the itemDelimiter to tab put the ciParameters of this card of me into tSpec put the left of group "ciControls" of me into tLeft put 8 + the top of group "ciControls" of me into tTop repeat for each line tControl in tSpec local tLabel, tId copy control "LABEL" of card "Control Haven" of me to group "ciControls" of this card of me put it into tLabel set the text of tLabel to item 1 of tControl & ":" set the topLeft of tLabel to tLeft, tTop copy group (item 2 of tControl) of card "Control Haven" of me to group "ciControls" of this card of me put it into tId set the ciName of tId to item 1 of tControl set the ciRange of tId to item 3 of tControl if item 4 of tControl is not empty then set the ciValue of tId to item 4 of tControl end if set the topLeft of tId to the right of tLabel, tTop put the bottom of tId into tTop end repeat end createCIControls function createCommand local tVisualEffect local tName, tParameters repeat with tIndex = 1 to the number of groups of group "ciControls" put the ciValue of group tIndex of group "ciControls" into tParameters[the ciName of group tIndex of group "ciControls"] end repeat put the short name of this card into tName combine tParameters using "~" and space replace "~" with " and " in tParameters return "visual effect " & quote & tName & quote & " slow with " & tParameters end createCommand X ciParameters _ W Lucida Grande W Palatino W Palatino W Palatino $ W Palatino W Palatino U Lucida Grande U Lucida Grande U Monaco W Monaco U Monaco W Monaco @U Lucida Grande cREVGeneral scriptChecksum #g,`1 debugObjects handlerList 7preOpenStack preOpenCard createCIControls createCommandbreakPoints scriptSelection char 1912 to 1911 bookmarks prevHandler createCIControlstempScript script h
on preOpenStack
set the label of button "Effect Name" to "CIRippleTransition"
go to card "CIRippleTransition"
end preOpenStack
on preOpenCard
createCIControls
end preOpenCard
on createCIControls
if there is no group "ciControls" of this card of me then
exit createCIControls
end if
repeat while the number of controls of group "ciControls" of this card of me > 0
delete control 1 of group "ciControls" of this card of me
end repeat
local tSpec, tControl, tTop, tLeft
set the itemDelimiter to tab
put the ciParameters of this card of me into tSpec
put the left of group "ciControls" of me into tLeft
put 8 + the top of group "ciControls" of me into tTop
repeat for each line tControl in tSpec
local tLabel, tId
copy control "LABEL" of card "Control Haven" of me to group "ciControls" of this card of me
put it into tLabel
set the text of tLabel to item 1 of tControl & ":"
set the topLeft of tLabel to tLeft, tTop
copy group (item 2 of tControl) of card "Control Haven" of me to group "ciControls" of this card of me
put it into tId
set the ciName of tId to item 1 of tControl
set the ciRange of tId to item 3 of tControl
if item 4 of tControl is not empty then
set the ciValue of tId to item 4 of tControl
end if
set the topLeft of tId to the right of tLabel, tTop
put the bottom of tId into tTop
end repeat
end createCIControls
function createCommand
local tVisualEffect
local tName, tParameters
repeat with tIndex = 1 to the number of groups of group "ciControls"
put the ciValue of group tIndex of group "ciControls" into tParameters[the ciName of group tIndex of group "ciControls"]
end repeat
put the short name of this card into tName
combine tParameters using "~" and space
replace "~" with " and " in tParameters
return "visual effect " & quote & tName & quote & " slow with " & tParameters
end createCommand
CIPageCurlTransition @ X ciParameters ubacksideImage IMAGE shadingImage IMAGE angle ANGLE -180,180 0 extent RECTANGLE 0,0,400,300 radius SCALAR 0,1000 200 cREVGeneral bookmarks handlerList tempScript prevHandler script CICopyMachineTransition @ X ciParameters ocolor COLOR extent RECTANGLE 0,0,400,300 angle ANGLE 0,360 0 width SCALAR 0.1,1000 200 opacity SCALAR 0,3 1.3 CIDissolveTransition @ X ciParameters CIFlashTransition @ X ciParameters center POINT 200,150 color COLOR 255,255,255 extent RECTANGLE 0,0,400,300 maxStriationRadius SCALAR 0,10 2.58 striationStrength SCALAR 0,3 0.5 striationContrast SCALAR 0,3 1.375 fadeThreshold SCALAR 0,1 0.85 - CIModTransition @ X ciParameters bcenter POINT 300,200 radius SCALAR 0,500 100 angle ANGLE -360,360 2 compression SCALAR 1,800 300 CIRippleTransition @ X ciParameters tshadingImage IMAGE extent RECTANGLE 0,0,400,300 center POINT 200,150 width SCALAR 1,1000 30 scale SCALAR -50,50 50 CISwipeTransition @ X ciParameters Ycolor COLOR extent RECTANGLE 0,0,400,300 width SCALAR 0.1,1000 600 opacity SCALAR 0,1 0 !CIDisintegrateWithMaskTransition @ X ciParameters emaskImage IMAGE shadowRadius SCALAR 0,1000 8 shadowOffset POINT 0,-10 shadowDensity SCALAR 0,1 0.65 % Control Haven @ X cREVGeneral bookmarks handlerList prevHandler tempScript script & ' , C Background i "Z cREVGeneral revUniqueID 1115592112732 bookmarks handlerList tempScript prevHandler script Title % Z 4 cREVGeneral revUniqueID 1115589843295 CoreImage Visual Effects i , x cREVGeneral revUniqueID 1115591600776 Label Field 2 l cREVGeneral revUniqueID 1115590157806 With Tiger comes Apple's new GPU accerelated image processing framework - Core Image. The engine now has built-in support for the Transition category of effects supplied by this framework. To support this, the visual effect collection of commands have new syntax: J J U } ' mvisual effectsetProp ciValue pValue
set the text of image "Source Image" to the text of image id pValue
put the text of image "Source Thumbnail" to the text of image id pValue
end ciValue
getProp ciValue
return the id of image "Image" of me
end ciValue
on dragEnter
if the number of lines of the dragData["files"] is 1 then
set the acceptDrop to true
end if
end dragEnter
on dragDrop
dropFile line 1 of the dragData["files"]
end dragDrop
on dropFile pFilename
set the text of image "Source Image" to URL ("binfile:" & pFilename)
set the text of image "Source Thumbnail" to the text of image "Source Image"
set the imageData of image "Source Thumbnail" to the imageData of image "Source Thumbnail"
end dropFile
on resetMe
set the text of image "Source Image" to empty
set the text of image "Source Thumbnail" to empty
end resetMe
Source Thumbnail d P <