摘要 |
<p>Embodiments of the present invention provide a hit testing method and apparatus. The method includes: replacing color values of pixels of objects displayed on the screen with corresponding identifier (ID) values of the objects; storing the ID values in a bitmap array, wherein each element of the bitmap array corresponds to one or more pixels of a respective object; in response to capturing a hit event, acquiring a hit coordinate on the screen corresponding to the hit event; determining a bitmap array element corresponding to the hit coordinate; and identifying an object related to the hit event, according to the ID value associated with the bitmap array element.</p> |