export snapshot transparent?

Terry Judd tsj at unimelb.edu.au
Mon May 10 21:56:03 EDT 2010


You could copy the word you want to create an image of into a transparent
(non-opaque) field, resize it to fit the text (using formattedWidth and
formattedHeight), then use the import snapshot command to create an image
object. This will retain the transparency and you can do whatever you want
with it from there (e.g. Export it in whatever format or use it within Rev).

HTH,

Terry...


On 11/05/10 11:43 AM, "Nicolas Cueto" <niconiko at gmail.com> wrote:

> Hello,
> 
> To convert into transparent images (PNG or GIF) each of the words in a
> word-list, I am thinking of using Rev's "export snapshot" thus:
> 
>   put "elephant" into tNewWordEnglish
>   put adjustFieldSizeToWordLength(tNewWordEnglish) into tNewRect
>   set the rect of field "exportEnglish" to tNewRect
>   put tNewWordEnglish into field "exportEnglish"
>   export snapshot from rect tNewRect of window tWIS to file tPath as PNG
>   put "zousan" into tNewWordJapanese
>   ...
> 
> Obviously this isn't going to result in a transparent image but, is
> there a way of configuring "things" so that it might?
> 
> Thank you.
> 
> (And if you're wondering why export the words as images instead of
> simply relying on text-fields... to ensure young Japanese learners see
> font-wise what their teacher rather than the OS's limitations
> intended. I realize there's "revFontLoad", but long painful experience
> teaches me to not rely on how Rev and Windows-on-Japanese-PCs interact
> font-wise. Even today, despite running the latest version of Rev on
> the latest Windows OS, when coding in Rev my fingers automatically
> adjust to Rev's imaginary keyboard layout rather than the actual
> physical keyboard layout of my Japanese machine.)
> 
> --
> Nicolas Cueto
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list