Page 1 of 1

Repeat (instead of strech) an image to make a window border

Posted: Fri Sep 23, 2011 08:59
by TeddyBear94
Hello Everybody !

I see that for taharezlook, the image used to make for example the window border is simply streched when a window is created.
I wanted to know if it is possible to repeat (instead of strech) an image to make a window border.
I think the thing to change is on .looknfeel file :

Code: Select all

<PropertyDefinition name="VertImageFormatting" initialValue="Stretched" redrawOnWrite="true" />

What are the value available for this kind of property ? If "Repeat" is available, it would be perfect :P.

Thanks in advance.

Teddy.

Re: Repeat (instead of strech) an image to make a window bor

Posted: Fri Sep 23, 2011 13:20
by TeddyBear94
I think I got something :
In Taharez looknfeel file I found this :

Code: Select all

<VertFormat type="Tiled" />

I will try this evening.

Re: Repeat (instead of strech) an image to make a window bor

Posted: Tue Sep 27, 2011 09:56
by TeddyBear94
I read more deeply the documentation "Introduction to Falagard 'looknfeel' XML" and I found all I need in it. ==> Resolved.
Really helpful.

Teddy.

Re: Repeat (instead of strech) an image to make a window bor

Posted: Tue Sep 27, 2011 12:01
by Kulik
Please post the solution to your problem so others can see it when they search the forum.

Re: Repeat (instead of strech) an image to make a window bor

Posted: Wed Sep 28, 2011 11:54
by TeddyBear94
Well :( ... I didn’t have enough time to test my solution.
As well my solution is tested, I post it.

Teddy.

Re: Repeat (instead of strech) an image to make a window bor

Posted: Fri Sep 30, 2011 06:30
by CrazyEddie
I will post an answer here. The short answer is most definitely yes, this can be done pretty easily.

The slightly longer answer is that in order to do this, there's probably a little more work involved that what would be ideal. Basically the stock skins all use the FrameComponent to specify the images to be used for the window borders, and unfortunately the formatting of the edges for this component is fixed in 'stretch' mode (although it does support changing the formatting of the image used to fill the background area. What this means is, to get the tiled/repeated formatting of edges, you need to 'explode' the FrameCompontent into a set of ImageryComponent definitions, which do allow you to set the formatting of the image drawn by way of the HorzFormat and VertFormat tags - or HorzFormatProperty and VertFormatProperty tags to source that setting from a property.

So, to conclude, basically you just swap the FrameComponent for a bunch of ImageryComponent definitions. It's quite a bit more XML, though internally things are handled much in the same way.

Of course it would be nice if there were format settings for each edge that worked with FrameComponent. If you want to add a feature request to mantis for this (with a link back here), then we would surely look at that some time in the future (as opposed to forgetting about it entirely ;) ).

CE.

Re: Repeat (instead of strech) an image to make a window bor

Posted: Fri Sep 30, 2011 12:25
by TeddyBear94
Yep, it is exactly what I did:
I have nine imagerycomponents, I fixed VertFormat to 'tiled' for RightEdge, LeftEdge and Background and I fixed HorzFormat to 'tiled' for TopEdge, BottomEdge and Background.
The most boring is to define the differents size and coordinate for each component.
I have finish to write it but components are not placed as I want (maybe some bad copy and paste).
When it is debugged, I can post the code here.

Of course it would be nice if there were format settings for each edge that worked with FrameComponent. If you want to add a feature request to mantis for this (with a link back here), then we would surely look at that some time in the future (as opposed to forgetting about it entirely )

Oh yeah! Because the xml of "tiledFrameWindowByTeddy" is looong and awful.
I just submit a request to mantis.

Teddy.