WhichSector Method
The WhichSector method populates the host descriptor (curobject) with details about the sector, identified by the passed index or x,y location.
This method has the following syntax:
integer = SpriteDescriptor.WhichSector(displayfield = ActiveField
[, sectorindex = integer][, x = integer, y = integer])
This method has the following parameters:
displayfield
(Required) Specifies the field on which the sector is displayed.
spriteindex
Specifies the index of the sector in the BgBitmap’s sectormap.
If x and y are specified, this index is treated as a limit index, and the first sector with a lower index at the x,y location is used to populate the host descriptor.
Because the sector index is also a Z-order index for the sectors, successive calls to WhichSector, passing the location and the index of the previous “hit”, identify any underlying sectors, one by one.
x
Specifies the x-location of the sector relative to the field, in pixels.
y
Specifies the y-location of the sector relative to the field, in pixels.
The method returns ER_OK if a sector is found.
Last modified date: 12/20/2023