[Select]

Desktop


Index

 

DragASprite

The DragASprite module was updated in RISC OS 4 to add a number to ease the use of the module. The rendering of the dragged object was updated in Select 2 to take advantage of the transparent rendering of sprites, making it easier to see where the object dragged was being placed.

The full bit flag set as used by R0 on entry to SWI DragASprite_Start is as follows :

0-1     Horizontal location of sprite in box:
             00      Left
             01      Centre
             10      Right
             11      <undefined>
             (See PRM 3-301)
     2-3     Vertical location of sprite in box:
             00      Bottom
             01      Centre
             10      Top
             11      <undefined>
             (See PRM 3-301)
     4-5     Drag bounding box is:
             00      Whole screen
             01      Display area of window that the pointer's over
             10      User specified
             11      <undefined>
             (See PRM 3-301)
     6       Bounding box applies to:
             0       The box
             1       The pointer
             (See PRM 3-301)
     7       Control of drop-shadow:
             0       Don't do a drop-shadow
             1       Make a drop shadow when copying the sprite
             (See PRM 3-301)
     8       0       Sprite should be see-through
             1       Sprite should be solid
             (See PRM 5a-493)
     9       0       Sprite's position is determined by bits 0-3
             1       Sprite is centred on pointer position
             (New to RISC OS 4)
     10-31   Reserved for future use, should be set to 0.

The meaning of bit 8 changed slightly in Select 2. Under RISC OS 3.5 this bit was added to force the dragged image to be dithered with alternate masked pixels in a chequer-board pattern. Whilst this allowed the background to be dragged, it lost detail from the dragged sprite. This caused visual problems with sprites which used a dither pattern to make up their colours, such as the standard RISC OS sprite set.

Under Select 2 this behaviour was modified to use a true translucent sprite. However this effect is less effective as the number of colours in the display mode is reduced. At its extreme (2 colour modes) the sprite becomes solid. However, it is not expected that such low depths be used by many clients and so this is not a serious problem.


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