Language Reference Guide : System Classes : SpriteDescriptor Class : SpriteMap Method
 
Share this page          
SpriteMap Method
The SpriteMap method returns a spritemap string, suitable for use as an UpdBackground spritemap parameter, from a set of descriptors.
If a valid operation is specified, it is incorporated into the spritemap.
This method has the following syntax:
StringObject = SpriteDescriptor.SpriteMap([descriptors = array of SpriteDescriptor]
          [, operation = varchar(32)])
This method has the following parameters:
descriptors
Specifies the set of sprite descriptors from which the spritemap is drawn. If none is provided, the host SpriteDescriptor object itself is used.
operation
Specifies the way in which the sprites are applied when this spritemap is used in an ActiveField.UpdBackground call. Valid operations are:
'apply'
The field background is overlaid by the sprites defined in the spritemap. Previous sprites disappear.
'assign'
The spritemap is assigned to the field, but without changing the field background. The next refresh of the field will apply the spritemap and change the display.
'add'
The single sprite contained in the spritemap is applied to the field background. Previous sprites are preserved.
'remove'
The sprite whose PropertyString or SpriteIndex matches the single sprite contained in the spritemap disappears from the field's background. Other sprites are preserved.
'replace'
The sprite whose PropertyString or SpriteIndex matches the second sprite contained in the spritemap disappears from the field's background, and the first sprite from the spritemap is applied to the field background. Other existing sprites are preserved.
'query'
The descriptors parameter is populated with the sprite descriptors defining the existing field background. Any descriptors provided with the parameter are ignored.
Default: 'apply'
The method returns a string object containing the spritemap, or null if the parameters cannot be evaluated properly.