link to my #22 event presentation
Jim Lambert
jiml at netrin.com
Sat May 14 12:47:38 EDT 2011
Here's an alternate technique for creating puzzle pieces.
In last week's great Live LiveCode event
> http://www.ustream.tv/recorded/14547851
Colin generously shared the techniques and code which deservedly won him top prize in the "Build An App In A Day" contest at runrevlive11.
He explained the tricky complexities of finding the correct bytes in the master picture's imagedata and copying them row-by-row into the correct bytes of the imagedata of the corresponding puzzle piece.
For comparison, he demonstrated Director's COPYPIXELS function, which with one simple command allows you to copy entire arbitrary rects between Cast Members and/or the Stage.
Wouldn't it be handy if LiveCode had a Copypixels function?
Oh wait, it kind of does!
LiveCode's 'Import/export snapshot' is a poor cousin to Director's Copypixels. With it we can grab whole arbitrary rects in one command.
Here is a demonstration of an alternate technique to make puzzle pieces without going anywhere near imagedata bytes.
http://netrin.on-rev.com/misc/stamps/test.html
Jim Lambert
More information about the use-livecode
mailing list