Page 1 of 1

Reminder Example: Capture & Skinning (solved)

Posted: Thu Jun 14, 2012 5:39 pm
by townsend
I've got this cute little Reminder Example.
But it's got a bug-- and I can't seem to figure out why.

This stack takes a text field and captures it into a transparent image.
Then it skins that transparent image, so it appears as floating text.

Here's what the stack looks like:
891 Reminder1.JPG
Notice I have this on a gray background.
When the Create Image button is pressed,
the text turns into a transparent image and is skinned:
891 Reminder2.JPG
891 Reminder2.JPG (8.81 KiB) Viewed 2002 times
See. It's not a clear graphic.
There are remnants. Not from the gray background,
but from the original black font.


I've got this set up with a timer, so after 5 seconds,
the skinning is cancelled and the stack reappears.
Changing the textHeight seems to affect the severity of the remnants.
But I don't know why. It shouldn't.

Here's the code:

Code: Select all

on mouseUp
     set visible of fld "source.line" to false
     put rect of fld "source.line" into tRect
     create img "reminder"
     export snapshot from rect tRect of fld "source.line" to img "reminder" as gif
     select empty
     set windowshape of this stack to id of image "reminder"
     call do.timer
end mouseUp

Re: Reminder Example: Capture & Skinning

Posted: Tue Jul 10, 2012 6:35 pm
by townsend
I finally figured this out. It seems when you

Code: Select all

set windowshape of this stack to id of image "reminder"
you must also

Code: Select all

set the visible of image reminder to false
Because setting the windowshape of a stack, creates a duplicate image.
Once this is done, the original image is no longer needed.