Just display content, not card
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Just display content, not card
I'm having a brain freeze again.
Is is possible to display just text, kinda floating somewhere on the screen without showing the card behind it? I tried the blends but the whole lot dissapears...
Is is possible to display just text, kinda floating somewhere on the screen without showing the card behind it? I tried the blends but the whole lot dissapears...
Andy,
you could do a stack (substack) with a custom windowshape. Than place a text field on that stack. This is not all transparent but the closest to what you want that I can think of.
Go to Scott Rossi's site with his superb examples
http://www.tactilemedia.com/
go to: software
go to: see all tutorials
all the way down there is a stack WindowLab
It shows how to make custom shaped stacks.
regards
Bernd
you could do a stack (substack) with a custom windowshape. Than place a text field on that stack. This is not all transparent but the closest to what you want that I can think of.
Go to Scott Rossi's site with his superb examples
http://www.tactilemedia.com/
go to: software
go to: see all tutorials
all the way down there is a stack WindowLab
It shows how to make custom shaped stacks.
regards
Bernd
This is "interesting"
If I try and use the imported snapshot as the windowShape and backgroundPattern, then I get a badly rendered blob the size of the stack. If I export that imported snapshot to a file and then reimport it and use the newly imported image as the windowShape and backgroundPattern, then it works perfectly.
This is on Windows (XP Pro) here.
Code: Select all
import snapshot from field "fldBGtext"
################################
## uncomment the export/import to/from file below to make it work
##
## export the last image to file "imgBGtext.png" as png
## delete the last image
## import paint from file "imgBGtext.png"
##
## uncomment above to make it work
#################################
set the visible of the last image to false
set the windowShape of this stack to the id of the last image
set the backgroundPattern of this stack to the id of the last image
This is on Windows (XP Pro) here.
Hi all,
no need to import/export/import the snapshot image!
Do this:
1. Create an EMPTY image "tText"
2. The field with your text MUST be NOT opaque and have NO border and can be invisible
3. Add this script to your stack:
...
export snapshot from rect(the rect of fld 1) of fld 1 to img "tText" as PNG
set the topleft of img "tText" to 0,0
set the windowshape of this stack to the id of img "tText"
...
Works fine here, but the rendered text is not too cute :-/
Best
Klaus
no need to import/export/import the snapshot image!
Do this:
1. Create an EMPTY image "tText"
2. The field with your text MUST be NOT opaque and have NO border and can be invisible
3. Add this script to your stack:
...
export snapshot from rect(the rect of fld 1) of fld 1 to img "tText" as PNG
set the topleft of img "tText" to 0,0
set the windowshape of this stack to the id of img "tText"
...
Works fine here, but the rendered text is not too cute :-/
Best
Klaus
Sparkout,
Wilhelm Sanke, who does a lot with images in Rev refers repeatedly to PNG's that have not been saved to a file and then reimported as pre-PNG. They behave differently then after saving and reimporting. He event gives a recipe for crashing Rev with these.
from this thread:
http://www.mail-archive.com/use-revolut ... 23359.html
http://www.mail-archive.com/use-revolut ... 15956.html
I did not have the problem with your script on a Mac, it showed the text as backgroundpattern without exporting the PNG first.
But there seem to be peculiarities with unsaved PNG's.
If you can come up with a demo stack you might want to bugzilla this.
regards
Bernd
Wilhelm Sanke, who does a lot with images in Rev refers repeatedly to PNG's that have not been saved to a file and then reimported as pre-PNG. They behave differently then after saving and reimporting. He event gives a recipe for crashing Rev with these.
from this thread:
http://www.mail-archive.com/use-revolut ... 23359.html
and here maybe more pertinent to the problem you saw:First of all, the one image used in the test stack needs to be of the "Pre-PNG" type, an image type I have named as such and described in detail in my stack "More about Masks"
<http://www.sanke.org/Software/MoreAboutMasksRev3.zip> in the text brought up on the menu card from the topright introduction button.
"Pre-PNG" images are basically those that are created or modified (as to their imagedata) in Revolution and have not yet been saved as external files and then been re-imported. Even if you export a snapshot using "to image x as PNG" (image x being an image already existing on the card), the resulting image will remain a Pre-PNG, also copying and pasting the Pre-PNG to another card or stack preserves the quality of the Pre-PNGs which behave differently in some respects. For details see my comments in "More about Masks".
http://www.mail-archive.com/use-revolut ... 15956.html
I did not have the problem with your script on a Mac, it showed the text as backgroundpattern without exporting the PNG first.
But there seem to be peculiarities with unsaved PNG's.
If you can come up with a demo stack you might want to bugzilla this.
regards
Bernd
That's actually perfect for my needs! Thanks, Klaus.Klaus wrote:Hi all,
no need to import/export/import the snapshot image!
Do this:
1. Create an EMPTY image "tText"
2. The field with your text MUST be NOT opaque and have NO border and can be invisible
3. Add this script to your stack:
...
export snapshot from rect(the rect of fld 1) of fld 1 to img "tText" as PNG
set the topleft of img "tText" to 0,0
set the windowshape of this stack to the id of img "tText"
...
Works fine here, but the rendered text is not too cute :-/
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Using the export command with the "from rect" option is limited to objects that are visible on screen, and won't render with transparent regions such as the blank spaces between words and lines in a field.
Instead you might consider the newer "from object" syntax added with the rendering engine overhaul in v2.7:
http://revjournal.com/blog.irv?pid=1253632044.696527
Instead you might consider the newer "from object" syntax added with the rendering engine overhaul in v2.7:
http://revjournal.com/blog.irv?pid=1253632044.696527
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn