The Wimp



Window background tiling

Tiled background windows were originally introduced in RISC OS 3.5 to improve the appearance of windows within the Desktop. The original tiling mechanism, documented in PRM 5a-488, will replace the lightest grey (grey 1) background with a tiled sprite 'tile_1', or 'tile_1-<depth>' where <depth> is the number of bits per pixel for the current mode.

This was extended in RISC OS 4 to allow other window backgrounds to be tiled with other sprites. For example, a window with a black background (colour 7) would use 'tile_7' or 'tile_7-<depth>'. As well as this, the menu background could be changed from its default of white to a tiled background, using the sprite 'tile_m' or 'tile_m-<depth>'. A new default sprite was supplied for menu tiling.

From Wimp 6.33, this behaviour has been extended further in order to function better with high resolution desktop modes. When a high resolution mode (one which uses eigen factors of 0, specified with 'EX0 EY0' in the mode string) is used the regular tile generally appears very poor in comparison to the desktop font. This is due to the default supplied tile being rendered at its natural resolution, being suitable for a normal 90 DPI mode (one which uses eigen factors of 1, specified with 'EX1 EY1' in the mode string). In this form, the tile is scaled up and thus appears blocky in the high resolution modes.

The tiling mechanism has been extended to improve the appearance of such tiles by scaling them so that they match the resolution of the mode they are being displayed in. As users may have supplied a tile sprite which requires particular scaling in order to appear correctly, reusing the same tile name is not possible. Instead, new tiles named 'tile_<colour>r' and 'tile_<colour>r-<depth>' will be used. These will be searched for only after the original tiles in order that any original, user-specified, tiles are retained.

Tiles will be rendered using the new OS_SpriteOp 65 tiling operation, so take advantage of acceleration where available.

This documentation is copyright 3QD Developments Ltd 2013 and may not be reproduced or published in any form without the copyright holders permission. RISC OS is subject to continuous development and improvement as such all information is reproduced by 3QD Developments Ltd in good faith and is believed to be correct at the time of publication E&OE. 3QD Developments Ltd cannot accept any liability for any loss or damage arising from the use of any information provided as part of the RISC OS Documentation.

HTML document version 1.03 3rd November 2015