Package-level declarations

Types

Link copied to clipboard
enum Align : Enum<Align>
Link copied to clipboard
data class AspectRatio(val align: Align, val meetOrSlice: MeetOrSlice) : AttributeOrPropertyValue
Link copied to clipboard
sealed interface AttributeOrPropertyValue
Link copied to clipboard

Specifies in which way to combine Shapes to form a Composition

Link copied to clipboard
enum ClipOp : Enum<ClipOp>

Used internally to define ClipModes.

Link copied to clipboard
class Composition(val root: CompositionNode, var bounds: CompositionDimensions = defaultCompositionDimensions)

A vector composition.

Link copied to clipboard
data class CompositionDimensions(val x: Length, val y: Length, val width: Length, val height: Length)
Link copied to clipboard
class CompositionDrawer(documentBounds: CompositionDimensions = defaultCompositionDimensions, composition: Composition? = null, cursor: GroupNode? = composition?.root as? GroupNode)

A Drawer-like interface for the creation of Compositions This should be easier than creating Compositions manually

Link copied to clipboard
sealed class CompositionNode

Describes a node in a composition

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open class GroupNode(val children: MutableList<CompositionNode> = mutableListOf()) : CompositionNode

Represents a group node in a composition hierarchy. A GroupNode itself does not have explicit contents but serves as a container for managing child nodes. It allows grouping of multiple CompositionNode instances and provides functionalities like calculating the bounds for all its child elements and copying itself with overrides.

Link copied to clipboard

Represents a specialized type of GroupNode in a composition hierarchy, serving as a container for child nodes.

Link copied to clipboard
class ImageNode(var image: ColorBuffer, var x: Double, var y: Double, var width: Double, var height: Double) : CompositionNode

a CompositionNode that holds a single image ColorBuffer

Link copied to clipboard
Link copied to clipboard
sealed interface Length : AttributeOrPropertyValue
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface Paint : AttributeOrPropertyValue
Link copied to clipboard
sealed interface Shade : AttributeOrPropertyValue
Link copied to clipboard
class ShapeNode(var shape: Shape) : CompositionNode

a CompositionNode that holds a single Shape

Link copied to clipboard
data class ShapeNodeIntersection(val node: ShapeNode, val intersection: ContourIntersection)

Data structure containing intersection information.

Link copied to clipboard
data class ShapeNodeNearestContour(val node: ShapeNode, val point: ContourPoint, val distanceDirection: Vector2, val distance: Double)

Data structure containing information about a point in a ShapeContour closest to some other 2D point.

Link copied to clipboard
Link copied to clipboard
sealed class Styleable
Link copied to clipboard
data class TextNode(var text: String, var contour: ShapeContour?) : CompositionNode

a CompositionNode that holds a single text

Link copied to clipboard
Link copied to clipboard

Specifies if transformations should be kept separate or applied to the clipped object and reset to identity.

Link copied to clipboard
class UserData<T : Any>(val name: String, val initial: T)

org.openrndr.shape.UserData delegate

Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun Drawer.composition(composition: Composition)

Renders a vector Composition onto the Drawer. This method applies transformations, styles, and renders the hierarchy of nodes from the given Composition object.

Link copied to clipboard
fun Composition.draw(cursor: GroupNode? = this.root as? GroupNode, drawFunction: CompositionDrawer.() -> Unit)

Draws content into an existing composition using the provided drawing function.

Link copied to clipboard
fun drawComposition(documentBounds: CompositionDimensions = defaultCompositionDimensions, composition: Composition? = null, cursor: GroupNode? = composition?.root as? GroupNode, drawFunction: CompositionDrawer.() -> Unit): Composition

Draws a vector composition by applying a provided drawing function.

Link copied to clipboard
fun Program.drawComposition(documentBounds: CompositionDimensions = CompositionDimensions(0.0.pixels, 0.0.pixels, this.drawer.width.toDouble().pixels, this.drawer.height.toDouble().pixels), composition: Composition? = null, cursor: GroupNode? = composition?.root as? GroupNode, drawFunction: CompositionDrawer.() -> Unit): Composition

Draws a composition within the specified document bounds or an existing composition. This function utilizes a customizable draw function to define the drawing behavior.

fun Program.drawComposition(documentBounds: Rectangle, composition: Composition? = null, cursor: GroupNode? = composition?.root as? GroupNode, drawFunction: CompositionDrawer.() -> Unit): Composition

Draws a composition using the specified document bounds and drawing logic. Optionally, an existing composition and cursor can be passed to update or build upon them.

Link copied to clipboard

Filters a CompositionNode and its hierarchy based on the provided filter function. The method recursively applies the filter to the node and its children, creating a new hierarchy that contains only the nodes for which the filter returns true. If the filter condition fails for the root node, null is returned.

Link copied to clipboard

Finds first CompositionNode to match the given predicate.

Link copied to clipboard

Finds all CompositionNode instances in the current node hierarchy that satisfy the given filter. Traverses the hierarchy recursively, evaluating each node and its children.

Link copied to clipboard

find all descendant GroupNode nodes, including potentially this node

Link copied to clipboard

find all descendant ImageNode nodes, including potentially this node

Link copied to clipboard

find all descendant ShapeNode nodes, including potentially this node

Link copied to clipboard

Recursively finds all terminal nodes within the composition tree starting from the current node and applies the provided filter to determine which nodes to include in the result.

Link copied to clipboard
Link copied to clipboard

Merges two lists of ShapeNodeIntersection removing duplicates under the given threshold. Used internally by intersections.

Link copied to clipboard

remove node from its parent CompositionNode

Link copied to clipboard
operator fun KMutableProperty0<Shade>.setValue(thisRef: Style, property: KProperty<*>, value: ShadeStyle)
Link copied to clipboard
fun transform(node: CompositionNode): Matrix44
Link copied to clipboard

visit this CompositionNode and all descendant nodes and execute visitor