Android Graphics Utilities / it.czerwinski.android.graphics / set
set
inline fun <T :
Path
> T.set(close:
Boolean
= false, init: T.() ->
Unit
):
Unit
Clear any lines and curves from this path, making it empty,
and applies a new path defined in init
function.
Example:
path.set(close = true) {
moveTo(0f, 0f)
lineTo(10f, 0f)
lineTo(10f, 10f)
lineTo(0f, 10f)
}
Parameters
close
- Set to true
if the path should be closed upon completion.
init
- Function initializing a new path.
Receiver The path.