Large Image Control

From XBMC4Xbox
Jump to navigation Jump to search

The large image control utilizes a background loading thread to load images. It is particularly useful for background images such as fanart. You can choose the position, size, transparency and contents of the image to be displayed.

Example

<control type="largeimage" id="1">
      <description>My first largeimage control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
      <colordiffuse>FFFFFFFF</colordiffuse>
      <fadetime>200</fadetime>
      <texture border="5" flipY="true" flipX="false">$INFO[fanart.image]</texture>
      <aspectratio>keep</aspectratio>
</control>

Available Tags and Attributes

In addition to the default control tags, the following tags are available. Note that each tag is lower case only. This is important, as xml tags are case-sensitive.

aspectratio This specifies how the image will be drawn inside the box defined by <width> and <height>. When set to “keep” the images aspect ratio will be kept, and the image will be resized to fit inside the <width>,<height> box (with transparent bars if the ratios are not the same). When set to “stretch”, the image will be stretched to <width> by <height> pixels (it's aspect ratio will therefore be lost). When set to “scale” then the box will be resized so that it completely fills the <width>,<height> box and any portions of the image outside the box will be cropped off. When set to "keep", the image can be aligned within the <width>,<height> box using the align attribute. For example, <aspectratio align="right">keep</aspectratio> will align the image on the righthand edge of the <width>,<height> box, and it will be centered vertically, whereas <aspectratio align="bottom">keep</aspectratio> will align the image on the bottom edge, centered horizontally. Finally, the scalediffuse="false" attribute can be used to specify that the diffuse texture should not be scaled with the image, i.e. that the diffuse texture should applie to the <width>,<height> box, regardless of the aspect of the main texture. This allows (for instance) the bounding box region to be masked off by the diffuse texture regardless of the image placement.
texture Specifies the image file which should be displayed. See here for additional information about textures.
info Specifies the information that this image control is presenting. XBMC will select the texture to use based on this tag. See here for more information.