Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
Resize control

Used to set the pixel ratio in Video Calibration.

The resize control is used to specify an area of changeable ratio for use in the screen calibration portion of Kodi. You can choose the size, and look of the resizer.


Example

<control type="resize" id="3">
<description>My first resize control</description>
<posx>80</posx>
<posy>60</posy>
<width>250</width>
<height>200</height>
<texturefocus>mytexture.png</texturefocus>
<texturenofocus>mytexture.png</texturenofocus>
<pulseonselect>true</pulseonselect>
<movingspeed acceleration="180" maxvelocity="300" resettimeout="200" delta="1">
<eventconfig type="up">
<eventconfig type="down">
<eventconfig type="left" acceleration="100" maxvelocity="100" resettimeout="160" delta="1">
<eventconfig type="right" acceleration="100" maxvelocity="100" resettimeout="160" delta="1">
</movingspeed>
</control>
const char const uint8_t size_t unsigned int unsigned int * height
Definition kodi-dev-kit/include/kodi/c-api/addon-instance/ImageDecoder.h:417
const char const uint8_t size_t unsigned int * width
Definition kodi-dev-kit/include/kodi/c-api/addon-instance/ImageDecoder.h:416

Available tags

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.

Tag Description
texturefocus Specifies the image file which should be displayed when the resizer has focus. See here for additional information about textures.
texturenofocus Specifies the image file which should be displayed when the resizer does not have focus.
movingspeed Specifies the allowed directional movements and respective configurations. The <movingspeed> tag section can contain as many <eventconfig> tags as required.

Note on use of movingspeed tag

The movingspeed tag must be specified to allow the control to be moved via an input device such as keyboard. Each direction can be specified and configured to simulate the motion effect with the eventconfig tag.

The following attributes allow the motion effect of the control to be configured:

Attribute Description
type Specifies the direction of movement. Accepted values are: up, down, left, right. All directions are optional and do not have to be included.
acceleration Specifies the acceleration in pixels per second (integer value).
maxvelocity Specifies the maximum movement speed. This depends on the acceleration value, e.g. a suitable value could be (acceleration value)*3. Set to 0 to disable. (integer value).
resettimeout Specifies the idle timeout before resetting the acceleration speed (in milliseconds, integer value).
delta Specifies the minimal pixel increment step (integer value).

The attributes acceleration, maxvelocity, resettimeout, delta can be specified individually for each eventconfig tag, or globally in the movingspeed tag, or a mixture, as the following example:

<movingspeed acceleration="180" maxvelocity="300" resettimeout="200" delta="1">
<eventconfig type="up">
<eventconfig type="down">
<eventconfig type="left" acceleration="100" maxvelocity="100" resettimeout="160">
<eventconfig type="right" acceleration="100" maxvelocity="100" resettimeout="160">
</movingspeed>

Revision History

v20 Skinning engine changes
[movingspeed] New tag added.

See also

Development: