Package-level declarations

Functions

Link copied to clipboard
fun PShape.bezierVertex(v2: Vector2, v3: Vector2, v4: Vector2)

Adds a cubic Bézier curve vertex to the current shape. The curve is defined by two control points and an end point.

Link copied to clipboard
fun PShape.fill(c: ColorRGBa)
Link copied to clipboard
fun PShape.pathToShapeContours(): List<ShapeContour>

Converts a PShape of type PATH into a ShapeContour.

Link copied to clipboard
fun PShape(shapes: List<Shape>): PShape

Combines a list of Shape objects into a single PShape object of type GROUP by adding each shape as a child.

fun PShape(shape: Shape): PShape

Converts a given Shape instance into a PShape object. If the shape contains a single contour, it is directly converted. Otherwise, the method constructs a complex PShape with paths and contours, mapping each segment type appropriately.

fun PShape(contour: ShapeContour): PShape

Converts a given ShapeContour into a PShape object. The method translates contour segments (linear, quadratic, cubic) into corresponding vertices and shapes suitable for use with the Processing library.

Link copied to clipboard
fun PVector(v: Vector2): PVector

Converts a given Vector2 instance into a PVector instance.

fun PVector(v: Vector3): PVector

Converts a Vector3 object into a PVector instance by converting its components to Float.

Link copied to clipboard
fun PShape.quadraticVertex(v2: Vector2, v3: Vector2)

Adds a quadratic Bezier vertex to the shape. The method specifies control and anchor points for the curve using Vector2 instances.

Link copied to clipboard
fun PShape.stroke(c: ColorRGBa)
Link copied to clipboard
fun Vector2.toPVector(): PVector

Converts an instance of Vector2 to a PVector by transforming its x and y values into floating-point numbers.

fun Vector3.toPVector(): PVector

Converts a Vector3 instance to a PVector instance.

Link copied to clipboard
fun PShape.toShape(): Shape

Converts this PShape instance into a Shape instance.

Link copied to clipboard
fun PShape.toShapeContours(): List<ShapeContour>

Converts this PShape instance into a list of ShapeContour objects.

Link copied to clipboard
fun PVector.toVector2(): Vector2

Converts this PVector instance into a Vector2 instance.

Link copied to clipboard
fun PVector.toVector3(): Vector3

Converts a PVector into an Vector3 instance.

Link copied to clipboard
fun PShape.vertex(v: Vector2)

Appends a vertex to the current shape using a 2D vector.