Package org.openrndr.shape

Types

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

Specifies in which way to combine Shapes to form a Composition

ClipOp
Link copied to clipboard
enum ClipOp : Enum<ClipOp>

Used internally to define ClipModes.

Composition
Link copied to clipboard
common
class Composition(root: CompositionNode, bounds: CompositionDimensions)

A vector composition.

CompositionDimensions
Link copied to clipboard
common
data class CompositionDimensions(x: Length, y: Length, width: Length, height: Length)
CompositionDrawer
Link copied to clipboard
class CompositionDrawer(documentBounds: CompositionDimensions, composition: Composition?, cursor: GroupNode?)

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

CompositionNode
Link copied to clipboard
common
sealed class CompositionNode

Describes a node in a composition

Display
Link copied to clipboard
common
interface Display : AttributeOrPropertyValue
DocumentStyle
Link copied to clipboard
common
class DocumentStyle : Styleable
GroupNode
Link copied to clipboard
common
open class GroupNode(children: MutableList<CompositionNode>) : CompositionNode

A CompositionNode that functions as a group node

GroupNodeStop
Link copied to clipboard
common
class GroupNodeStop(children: MutableList<CompositionNode>) : GroupNode
ImageNode
Link copied to clipboard
common
class ImageNode(image: ColorBuffer, x: Double, y: Double, width: Double, height: Double) : CompositionNode

a CompositionNode that holds a single image ColorBuffer

Inheritance
Link copied to clipboard
common
enum Inheritance : Enum<Inheritance>
Length
Link copied to clipboard
common
interface Length : AttributeOrPropertyValue
LineCap
Link copied to clipboard
common
interface LineCap : AttributeOrPropertyValue
LineJoin
Link copied to clipboard
common
interface LineJoin : AttributeOrPropertyValue
MeetOrSlice
Link copied to clipboard
common
enum MeetOrSlice : Enum<MeetOrSlice>
Numeric
Link copied to clipboard
common
interface Numeric : AttributeOrPropertyValue
Paint
Link copied to clipboard
common
interface Paint : AttributeOrPropertyValue
Shade
Link copied to clipboard
common
interface Shade : AttributeOrPropertyValue
ShapeNode
Link copied to clipboard
common
class ShapeNode(shape: Shape) : CompositionNode

a CompositionNode that holds a single Shape

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

Data structure containing intersection information.

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

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

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

a CompositionNode that holds a single text

Transform
Link copied to clipboard
common
interface Transform : AttributeOrPropertyValue
TransformMode
Link copied to clipboard
enum TransformMode : Enum<TransformMode>

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

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

org.openrndr.shape.UserData delegate

ViewBox
Link copied to clipboard
common
interface ViewBox : AttributeOrPropertyValue
Visibility
Link copied to clipboard
common
interface Visibility : AttributeOrPropertyValue

Functions

draw
Link copied to clipboard
fun Composition.draw(drawFunction: CompositionDrawer.() -> Unit)

Draw into an existing Composition.

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

Creates a Composition. The draw operations contained inside the drawFunction do not render graphics to the screen, but populate the Composition instead.

filter
Link copied to clipboard
common
fun CompositionNode.filter(filter: (CompositionNode) -> Boolean): CompositionNode?
findAll
Link copied to clipboard
common
fun CompositionNode.findAll(filter: (CompositionNode) -> Boolean): List<CompositionNode>
findGroups
Link copied to clipboard
common
fun CompositionNode.findGroups(): List<GroupNode>

find all descendant GroupNode nodes, including potentially this node

findImages
Link copied to clipboard
common
fun CompositionNode.findImages(): List<ImageNode>

find all descendant ImageNode nodes, including potentially this node

findShapes
Link copied to clipboard
common
fun CompositionNode.findShapes(): List<ShapeNode>

find all descendant ShapeNode nodes, including potentially this node

findTerminals
Link copied to clipboard
common
fun CompositionNode.findTerminals(filter: (CompositionNode) -> Boolean): List<CompositionNode>
map
Link copied to clipboard
common
fun CompositionNode.map(mapper: (CompositionNode) -> CompositionNode): CompositionNode
merge
Link copied to clipboard
fun List<ShapeNodeIntersection>.merge(threshold: Double = 0.5): List<ShapeNodeIntersection>

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

remove
Link copied to clipboard
common
fun CompositionNode.remove()

remove node from its parent CompositionNode

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

visit this CompositionNode and all descendant nodes and execute visitor

Properties

defaultCompositionDimensions
Link copied to clipboard
common
val defaultCompositionDimensions: CompositionDimensions
display
Link copied to clipboard
common
var Style.display: Display
fill
Link copied to clipboard
common
var Style.fill: Paint
fillOpacity
Link copied to clipboard
common
var Style.fillOpacity: Numeric
height
Link copied to clipboard
common
var Style.height: Length
lineCap
Link copied to clipboard
common
var Style.lineCap: LineCap
lineJoin
Link copied to clipboard
common
var Style.lineJoin: LineJoin
miterLimit
Link copied to clipboard
common
var Style.miterLimit: Numeric
opacity
Link copied to clipboard
common
var Style.opacity: Numeric
percent
Link copied to clipboard
common
val Double.percent: Length.Percent
pixels
Link copied to clipboard
common
val Double.pixels: Length.Pixels
preserveAspectRatio
Link copied to clipboard
common
var DocumentStyle.preserveAspectRatio: AspectRatio
shadeStyle
Link copied to clipboard
common
var Style.shadeStyle: Shade
stroke
Link copied to clipboard
common
var Style.stroke: Paint
strokeOpacity
Link copied to clipboard
common
var Style.strokeOpacity: Numeric
strokeWeight
Link copied to clipboard
common
var Style.strokeWeight: Length
transform
Link copied to clipboard
common
var Style.transform: Transform
viewBox
Link copied to clipboard
common
var DocumentStyle.viewBox: ViewBox
visibility
Link copied to clipboard
common
var Style.visibility: Visibility
width
Link copied to clipboard
common
var Style.width: Length
x
Link copied to clipboard
common
var Style.x: Length
y
Link copied to clipboard
common
var Style.y: Length