PatchClip

constructor(shape: Shape, basis: Rectangle, gridSize: Int = 32, distanceTolerance: Double = 0.5, fillRule: FillRule = FillRule.NON_ZERO, clipToPatch: Boolean = true)(source)

Parameters

shape

the shape, in the coordinates of basis; holes, like that of an O, are cut out by fillRule, and contours that overlap or cross themselves fill the shape once

basis

the rectangle of the shape that maps to the whole patch

gridSize

the number of grid cells along u and along v

distanceTolerance

the tolerance of the outline of the shape as it is sampled, in the coordinates of basis

fillRule

how the contours of the shape fill it

clipToPatch

true to keep only the part of the shape on the patch, where u and v are from 0 to 1; false to keep all of it, where the patch is extrapolated beyond its edges