isPixelOverlap

.isPixelOverlap( x1, y1, otherImage, x2, y2, isCentred=false )

Checks if this Image collides with 'otherImage', when they are at the locations given.

Unlike 'isOverlap' and 'isRectOverlap', this will perform a collision check on a per-pixel basis. This means that it will take into account the alpha values of the pixels. If two non-transparent pixels overlap, then there is a collision.

A non-transparent pixel is any pixel with an alpha value greater then 0.

x1/y1 is used for the location of this Image, whilst x2/y2 is used for the location of 'otherImage'.

The optional 'isCentred' parameter allows you to state if the x and y locations refer to the top-left corner of each image (the default), or the centre of them (when 'isCentred' is true).