with

fun Rectangle.with(width: Double = this.width, height: Double = this.height): Rectangle

Returns a new Rectangle with the specified width, height, and all the other dimensions from this one.

Parameters

width

the new Rectangle should have

height

the new Rectangle should have


Returns a new Rectangle with the specified size, and all the other dimensions from this one.

Parameters

size

the new Rectangle should have