Kodi Community Forum

Full Version: Meaning of different bordersizes for <image>
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What are the exact meanings and iteractions of all the 5s below (taken from <image> example from the Manual)?
I've played with them a bit, but I am still not sure.

<texture border="5" flipy="true" flipx="false">mytexture.png</texture>
<bordertexture border="5">mybordertexture.png</bordertexture>
Image_Control (wiki)

border="5" specifies the number of pixels from the edge of the texture that will not be stretched when stretching/scaling the texture. You can also specify border="left,top,right,bottom" if you need individual values for each edge.

the <bordertexture> is an additional texture used behind the main texture. The bordertexture is the size of the image control and then <bordersize> specifies how many pixels in from the edge that the main texture should be drawn on top. It's good if you need to specify a separate shadow or selection box texture. It is particularly useful if you specify "keep" as aspectratio because the bordertexture will conform to aspectratio of the main texture rather than the whole image control (e.g. you might specify a square 200x200 pixel image control but your texture has a ratio of 1:2 so the bordertexture will be 100x200 and the main image will be 90x190)
- <bordersize> is actually padding for <texture> regarding <control type="image"> bounding box
- <bordertexture> is just a background texture and <bordersize> does not apply to it
- the "border" attribute border defines safe zone for resizing (=edges) - vertical edges have fixed "border" size horizontally, and horizontal edges have fixed "border" size vertically