Reminder Example: Capture & Skinning (solved)

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

Reminder Example: Capture & Skinning (solved)

Post by townsend » Thu Jun 14, 2012 5:39 pm

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 1999 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
Attachments
ReminderExample.zip
(900 Bytes) Downloaded 208 times
Last edited by townsend on Tue Jul 10, 2012 6:37 pm, edited 1 time in total.

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

Re: Reminder Example: Capture & Skinning

Post by townsend » Tue Jul 10, 2012 6:35 pm

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.

Post Reply