Kodi Community Forum
<texture border="5"> and <bordersize>5</bordersize> - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: <texture border="5"> and <bordersize>5</bordersize> (/showthread.php?tid=338252)



<texture border="5"> and <bordersize>5</bordersize> - dnairb - 2018-12-10

I have a question regarding borders on textures. I assumed that the following would be equivalent regarding placing a border around an image, but it seems not:
Code:
<control type="image">
    <texture border="5">image.png</texture>
</control>



<control type="image">
    <bordersize>5</bordersize>
    <texture>image.png</texture>
</control>
I can't find much information in the wiki. Can anyone explain please?


RE: <texture border="5"> and <bordersize>5</bordersize> - Hitcher - 2018-12-10

xml:
<control type="image" id="1">
    <description>My first image control</description>
    <left>80</left>
    <top>60</top>
    <width>250</width>
    <height>200</height>
    <visible>true</visible>
    <colordiffuse>FFFFFFFF</colordiffuse>
    <fadetime>200</fadetime>
    <texture border="5" flipy="true" flipx="false">mytexture.png</texture>
    <bordertexture border="5">mybordertexture.png</bordertexture>
    <bordersize>5</bordersize>
    <texture>$INFO[MusicPlayer.Cover]</texture>
    <aspectratio>keep</aspectratio>
</control>

border

Used to specify a region of the texture to be considered a border that should not be scaled when the texture is scaled to fit a control's dimensions. The portion in the border region will remain unscaled. Particularly useful to achieve rounded corners that do not change size when a control is resized. Note that zoom animations and GUI rescaling will still affect the border region - it is just the scaling of the texture to the control size which is unaffected. Using border="5" will give a 5 pixel border all around the texture. You can specify each of the border amounts on each edge individually using border="left,top,right,bottom".

bordertexture

Specifies the image file which should be displayed as a border around the image. Use the <bordersize> to specify the size of the border. The <width> , <height> box specifies the size of the image plus border.

bordersize

Specifies the size of the border. A single number specifies the border should be the same size all the way around the image, whereas a comma separated list of 4 values indicates left,top,right,bottom values.