ScaledIsPointInPath

class ScaledIsPointInPath(scalingFactor: Float = 1.0f) : IsPointInPath

Unlike other platforms, Android doesn't provide an actual way of checking if a point is contained in a path. Android does, however, allow you to intersect paths. As such, check if a very small rectangle around the actual touch point overlaps with the path.

This class also builds in a scalingFactor which is used for dealing with screen density.

Constructors

Link copied to clipboard
constructor(scalingFactor: Float = 1.0f)

Functions

Link copied to clipboard
open override fun isPointInPath(transform: Transform, path: Path, x: Float, y: Float): Boolean