openrndr / org.openrndr.shape / Shape

Shape

class Shape (source)

Constructors

<init>

Shape(contours: List<ShapeContour>)

Properties

closedContours

val closedContours: List<ShapeContour>

compound

val compound: Boolean

contours

val contours: List<ShapeContour>

linear

val linear: Boolean

openContours

val openContours: List<ShapeContour>

outline

The outline of the shape

val outline: ShapeContour

topology

val topology: ShapeTopology

triangulation

val triangulation: List<Triangle>

Functions

contains

operator fun contains(v: Vector2): Boolean

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

hole

The indexed hole of the shape

fun hole(index: Int): ShapeContour

map

Apply a map to the shape. Maps every contour.

fun map(mapper: (ShapeContour) -> ShapeContour): Shape

polygon

fun polygon(distanceTolerance: Double = 0.5): Shape

splitCompounds

Splits a compound shape into separate shapes.

fun splitCompounds(winding: Winding = Winding.CLOCKWISE): List<Shape>

transform

Apply a tranform to the shape

fun transform(transform: Matrix44): Shape