<texture border="5"> and <bordersize>5</bordersize>
#1
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?
Reply
#2
<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.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
<texture border="5"> and <bordersize>5</bordersize>00