addRect

fun addRect(rect: Rect, dir: PathDirection = PathDirection.CLOCKWISE, start: Int = 0): PathBuilder

Adds rectangle to path, appending MOVE, three LINE, and CLOSE verbs.

Return

this builder for chaining

Parameters

rect

rectangle to add as a closed contour

dir

direction to wind added contour

start

initial corner: 0=top-left, 1=top-right, 2=bottom-right, 3=bottom-left


fun addRect(left: Float, top: Float, right: Float, bottom: Float, dir: PathDirection = PathDirection.CLOCKWISE, start: Int = 0): PathBuilder

Adds rectangle to path, appending MOVE, three LINE, and CLOSE verbs.

Return

this builder for chaining

Parameters

left

left edge of rectangle

top

top edge of rectangle

right

right edge of rectangle

bottom

bottom edge of rectangle

dir

direction to wind added contour

start

initial corner: 0=top-left, 1=top-right, 2=bottom-right, 3=bottom-left