Tiling a background image
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 9389
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Tiling a background image
Let us just suppose I have a small image of, say 68 x 68 pixels which I should like to tile across the background of a card or a stack:
- -
Apart from messing around with an external image-processing program is there a way to do this directly inwith LiveCode?
- -
Apart from messing around with an external image-processing program is there a way to do this directly inwith LiveCode?
Re: Tiling a background image
Does ->
not work for you?
However since this will be inherited, it may be a good idea to only set the bg pattern
of a graphic to your image, group the graphic and place the group on all cards you need to.
Code: Select all
set the backgroundpattern of whatever to 1005
## last param is the image ID
However since this will be inherited, it may be a good idea to only set the bg pattern
of a graphic to your image, group the graphic and place the group on all cards you need to.
Re: Tiling a background image
Read up -> backgroundpattern in the dictionary to see some caveats on Mac systems.
-
- Livecode Opensource Backer
- Posts: 9389
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Tiling a background image
I was wondering about setting the backGroundPattern of a card or even a stack.
And I really should have had that second cup of coffee.
- -
Well, caveats or not: works with LC 8.1.10 on MacOS 107 'Tired Lion'.
And I really should have had that second cup of coffee.
- -
Well, caveats or not: works with LC 8.1.10 on MacOS 107 'Tired Lion'.
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Tiling a background image
For those with experience with other worlds, how often does it happen that a query from someone has the solution already built-in and ready-to go in the language?
Craig
Craig
Last edited by dunbarx on Mon Oct 16, 2023 4:36 pm, edited 1 time in total.
Re: Tiling a background image
Is this a trick question?
-
- Livecode Opensource Backer
- Posts: 9389
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Tiling a background image
I don't know as the grammar is so bad I cannot understand it properly.
-
- Livecode Opensource Backer
- Posts: 9389
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Tiling a background image
That field did NOT inherit anything.
- -
In some ways that might be rather nice:
-
- -
In some ways that might be rather nice:
-
Re: Tiling a background image
Ah, thanks, I was not sure.
-
- Livecode Opensource Backer
- Posts: 9389
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Tiling a background image
So, what inherits what from what?
This is far from clear, and does not seem to be properly documented.
For instance, a field does not inherit backGroundPattern or backGroundColor from a stack, but is does inherit its font setting:
-
This is far from clear, and does not seem to be properly documented.
For instance, a field does not inherit backGroundPattern or backGroundColor from a stack, but is does inherit its font setting:
-
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Tiling a background image
As often as the question is for a basic essential.
For example, web pages had tiled backgrounds since almost the very beginning, and IIRC div elements (the basic building blocks of web UI objects) got them in the mid to late 90s. After the turn off the century we started to see attributes for those I'd still love to see in LC, like being able to control the origin point for the tiling.
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
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Tiling a background image
That field appears to be overriding the inheritance, no? Try clearing its backgroundColor property and see if that allows the inheritance.richmond62 wrote: ↑Mon Oct 16, 2023 3:14 pmSo, what inherits what from what?
This is far from clear, and does not seem to be properly documented.
For instance, a field does not inherit backGroundPattern or backGroundColor from a stack, but is does inherit its font setting:
-
Screen Shot 2023-10-16 at 5.12.20 pm.png
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
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Tiling a background image
Bad grammar? Where?
"Have", ah, autocorrect at work again. Fixed.
Perhaps did not understand the question; that is different.
I was making a point, as fan boys do now and then, that LC has within it most of the tools anyone could ever likely need, including odd use-case ones. In other words, someone simply refers one to an entry in the dictionary where the perfect solution sits ready and waiting. This happens often, and I was wondering if any other programming environment is as forthcoming.
Craig
"Have", ah, autocorrect at work again. Fixed.
Perhaps did not understand the question; that is different.
I was making a point, as fan boys do now and then, that LC has within it most of the tools anyone could ever likely need, including odd use-case ones. In other words, someone simply refers one to an entry in the dictionary where the perfect solution sits ready and waiting. This happens often, and I was wondering if any other programming environment is as forthcoming.
Craig
Re: Tiling a background image
Or make it transparentFourthWorld wrote: ↑Mon Oct 16, 2023 3:43 pmThat field appears to be overriding the inheritance, no? Try clearing its backgroundColor property and see if that allows the inheritance.
Re: Tiling a background image
Your point it taken and I think is valid - LC does provide a lot of conveniences for the developer, which is why we all love it really.dunbarx wrote: ↑Mon Oct 16, 2023 4:42 pmI was making a point, as fan boys do now and then, that LC has within it most of the tools anyone could ever likely need, including odd use-case ones. In other words, someone simply refers one to an entry in the dictionary where the perfect solution sits ready and waiting. This happens often, and I was wondering if any other programming environment is as forthcoming.
Craig
Only sad to say newer developments and externals, not so much.
There was a recent discussion about how to sort the polyGrid. Yes it's simple.
But in the older days of the datagrid, they went the extra mile and gave you a build in handler to to this - and as a single object goes, the old datagrid has an absolutely phenomenal API which no modern external even comes close to - these are handlers that simplify life but in the newer PG/PL are absent and it's up to you to program these (much like any other IDE really, but I think that loses something...)