Click or drag to resize
LayerBaseGetTopSolidPixel Method
Determine the vertical offset of the top-most solid pixel within the specified rectangle.

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
public int GetTopSolidPixel(
	Rectangle testArea,
	Solidity solid
)

Parameters

testArea
Type: System.DrawingRectangle
Rectangle to test
solid
Type: (Default Namespace)Solidity
Solidity definition defining tile shapes

Return Value

Type: Int32
Layer-relative vertical coordinate (y) of the top-most solid pixel contained in the rectangle, or MinValue if none exists.
Remarks
This function (and solidity in general) only deals with solid boundaries of tiles. Therefore if the rectangle is fully embedded in a solid tile and is not crossing any solid boundaries, the return value will indicate that no solidity was found. This allows such features as tiles through which the player can jump upward but land down on solidly.
See Also