Questions You Were To Afraid To Ask!

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Questions You Were To Afraid To Ask!

Post by Garrett » Thu Sep 20, 2007 7:16 am

Ever have one of those questions you wanted to ask, but were too afraid to ask?

Here's one I've been keeping to myself for some time now because I was afraid that it was something I was overlooking. But a year now later, and I still can't find an answer to this.

Why is it when I select an image as the filler background on objects, it's never tiled using the entire image, but something like only a 3x3 or so square of the image I selected? This even includes images included with rev, such as the metacard compatible patterns.

I was recently working on something for someone and ran into this again, and yet again was completely baffled as to what the problem was. I had a 100x100 square image, I waned to set it as the tiled background of my stack, but only got like a small portion of it. I again tried with a 10x10, and still, same problem.

Am I missing something?? is there an undocumented property that I need to set to get the entire tile to be used?

I ended up manually creating images to tile over the stack.

Thanks in advance,
~Garrett

P.S. Anyone else got a question they were too afraid to ask? If so, might as well follow along here and post it with mine here in this thread. :-)

lbtony
Posts: 35
Joined: Tue Apr 11, 2006 9:01 am

Post by lbtony » Thu Sep 20, 2007 9:58 am

I think if you store this image on another card of your stack and them load it as your background of stack, it will work.

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Post by trevordevore » Thu Sep 20, 2007 2:13 pm

I just did the following test:

1) Created a new stack.
2) Imported a PNG image (291 x 75)
3) Set the backgroundPattern to the id of the image.

The image tiled nicely across the entire stack background. This is in version 2.8.1 of Revolution. I believe that version prior to 2.7 had limits on the size of graphics that tiled. This limitation was removed in 2.7. What version of Rev are you using? Does the above recipe work?[/img]
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Thu Sep 20, 2007 8:56 pm

I tried both of the above and still does not tile correctly for me. Here's a link to my test stack for this:

http://www.paraboliclogic.com/misc/testtileback.rev

I'm using Rev 2.8.x on Windows ME, but also encountered this on XP.

I also tried setting the background via the properties window, and then again via the stack script in onPreOpenStack, and both have the same result for me.

Does it have to be a specific file format such as PNG?

Thanks again,
~Garrett

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Post by trevordevore » Thu Sep 20, 2007 9:18 pm

I loaded your example stack on Windows XP (native) and 2000 (under Parallels) and it looked right to me. Here is a screenshot of your stack in Windows 2000 with the original image shown on top of it:

Image

What are you seeing?
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Sep 20, 2007 9:46 pm

Hi,

The picture is indexed and should be RGB. This may be one reason why it doesn't display correctly.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Fri Sep 21, 2007 3:04 am

I get this:

Image

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Sun Sep 23, 2007 9:52 pm

Nobody else gets the same effect above that I get when trying to tile the background of stacks and objects?

Klaus
Posts: 13878
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Post by Klaus » Sun Sep 23, 2007 10:07 pm

No, sorry, works fine here

I'm afraid you are cursed! ;-)

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Mon Sep 24, 2007 10:24 am

Garrett,

Please, find another machine to test on, e.g. one with Win XP installed, and ask a Win 2000 user to test your stack. If the same problem occurs on other Win 2000 machines, it might be a Rev bug.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Mon Sep 24, 2007 7:36 pm

Roger Willco.

Post Reply

Return to “Talking LiveCode”