combineWith

open override fun combineWith(tileImage: TileImage, offset: Position): TileImage

This method creates a new TileImage which is the combination of this one and the supplied tileImage. If there are two Positions which are present in both TileImages and at none of those positions is an EMPTYTile then the Tile in the supplied tileImage will be used, eg: tileImage overwrites this image.

The size of the new TileImage will be the size of the current TileImage UNLESS the offset + tileImage would overflow. In that case the new TileImage will be resized to fit tileImage accordingly. The TilesetResource of the original TileImage will be used.

Parameters

tileImage

the image which will be drawn onto this image

offset

The position on the target image where the tileImage's top left corner will be

Sources

(source)
Link copied to clipboard