angle and rotate commands
Rodney Tamblyn
rtamblyn at xtra.co.nz
Mon Oct 14 13:26:00 EDT 2002
Hello everyone,
I have just resubscribed to the Metacard list after taking a break
for a few months.
I've been experimenting with the angle and rotate commands with
images. It doesn't seem
to be possible to scale an image and set it's angle as well. Am I
missing something obvious here?
Here's the script:
on previewMedia what
...
#let's say the images all need to be rotated 90 degrees
set the angle of img "view" to 90
set the cursor to busy
set the filename of img "view" to theFile
put the height of img "view" into theH
put the width of img "view" into theW
#in this case I want to scale the images so they are never more than
#300 pixels wide or high. Images being displayed may be wide or tall -
#check this image and scale appropriately.
if (theW > theH) then
put 300 * (theH / theW) into theRat
set the width of img "view" to 300
set the height of img "view" to theRat
else
put 300 * (theW / theH) into theRat
set the height of img "view" to 300
set the width of img "view" to theRat
end if
end previewMedia
--
Rodney Tamblyn
401 North 6th Ave,
Pensacola FL 32501
USA (850) 4357794
More information about the metacard
mailing list