Package-level declarations
Types
How far text is moved up from the baseline of its parent, like the baseline-shift property of SVG
Specifies in which way to combine Shapes to form a Composition
The clip path of a node, like the clip-path property of SVG: the node is drawn where the shapes of the clip path are, with anti-aliased edges
A vector composition.
A Drawer-like interface for the creation of Compositions This should be easier than creating Compositions manually
Resolves the font families of text in compositions to font files, see fontFamily, fontWeight and fontStyle. Registers in and resolves with Fonts, the fonts of all programs, which user interfaces use too.
Interaction with a composition by the mouse, like the pointer events of SVG documents in browsers: entered and exited when the pointer moves onto or off a node and the groups it is in, pressed, released and clicked for the topmost node under the pointer. transform maps the coordinates of the composition to those of the mouse, the transform the composition is drawn with.
Describes a node in a composition
An event of CompositionInteraction: the node it is about, the point in the coordinates of the node, and the mouse event that caused it
The dash pattern of strokes, like the stroke-dasharray property of SVG
The baseline of text that its position is on, like the dominant-baseline property of SVG. AUTO is the alphabetic baseline.
The rule that decides which parts of a shape with overlapping or self-intersecting contours are filled, like the fill-rule of SVG
the color space that a primitive computes in, like color-interpolation-filters
A filter effect, like SVG's filter element: primitives applied in order to what a node draws, in region: in the coordinates of regionUnits, or everywhere when the region is null. Lengths of primitives are in user space, or in fractions of the bounds of the node when primitiveUnits is PaintUnits.BOUNDS.
an input of a filter primitive
A primitive of a FilterEffect: it computes an image from its inputs, which is the input of the next primitive and, when it has a result name, of later primitives that refer to it. Lengths are in the units of the FilterEffect.primitiveUnits.
The filter effects of a node, applied one after the other, like the filter property of CSS
The subregion of a primitive, like the x, y, width and height attributes of SVG filter primitives: in the units of FilterEffect.primitiveUnits, fractions of the bounds of the node for PaintUnits.BOUNDS. A component that is null is that of the default subregion: the union of the subregions of the inputs, or the region of the filter.
A font face that text in a group can use, like a @font-face rule of CSS, see org.openrndr.extra.textwriter.FontFace
The font families of text in order of preference, like CSS font-family
Settings of the font, like font-feature-settings (OpenType features and their values) and font-variation-settings (axes of variable fonts and their values)
The weight of a font, from 100 (thin) to 900 (black), 400 is normal and 700 is bold
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.
Represents a specialized type of GroupNode in a composition hierarchy, serving as a container for child nodes.
Whether a group is drawn on its own before it is blended with what is under it, like the isolation property of CSS. Groups with an opacity, a mask or a blend mode are always isolated.
how text is adjusted to its textLength, like the lengthAdjust attribute of SVG
the height of lines of text: normal, a multiple of the font size, or a length, like line-height
A marker, like SVG's marker: content drawn at the vertices of paths. The content is in the coordinates of viewBox, fitted into size by aspectRatio, or in the coordinates of size when there is no view box; the point reference of the content is placed on the vertex. The size is multiplied by the stroke weight when strokeWidthUnits is true. Clipping the content to the viewport, as SVG does by default, is part of the content.
How a Marker is turned at a vertex
The marker at vertices of paths, like the marker-start, marker-mid and marker-end properties of SVG
A mask, like SVG's mask: the alpha of what it is applied to is multiplied by the value of content, its luminance or its alpha by type. The content is in the coordinates of the node it is applied to, or in the bounds of that node when units is PaintUnits.BOUNDS; it is drawn in region, in the coordinates of regionUnits, or everywhere when the region is null.
The mask of a node, like the mask property of SVG
How a node is blended with what is drawn under it, like the mix-blend-mode property of CSS. The modes are those of the W3C compositing and blending specification.
an optional length: a Length, or none, like the textLength attribute and the inline-size property
The order in which the fill and the stroke of shapes and text are painted, like the paint-order property of SVG
The length that the author gives a path, like the pathLength attribute of SVG: lengths along the path, like those of dashes, are scaled by the actual length of the path divided by value. Null for the actual length.
Which parts of a node are hit by the pointer, like the pointer-events property of SVG: the fill and the stroke, when they are painted or always, and only when the node is visible or always. NONE is never hit.
a CompositionNode that holds a single Shape
Data structure containing intersection information.
Data structure containing information about a point in a ShapeContour closest to some other 2D point.
How shapes are rendered, like the shape-rendering property of SVG: shapes are not anti-aliased with CRISP_EDGES and OPTIMIZE_SPEED
Where text is placed relative to its position: the fraction of its width that is left of the position
The lines drawn along text, like the text-decoration property of CSS
the direction of text, like the direction property: left to right or right to left
a CompositionNode that holds a run of text, drawn along contour or starting at a position
Specifies if transformations should be kept separate or applied to the clipped object and reset to identity.
Effects on the rendering of shapes, like the vector-effect property of SVG
How the white space of text is handled, like the white-space property of CSS. Text in compositions is already collapsed or not, the value is kept so that it is written with the text; line feeds are line breaks of text that wraps, see inlineSize.
The direction that lines of text run in, like the writing-mode property: horizontally, or vertically from top to bottom; vertical lines follow each other to the left (VERTICAL_RL) or to the right (VERTICAL_LR)
Properties
how far text is moved up from the baseline of its parent, like baseline-shift; the shifts of groups add up
the color that Paint.CurrentColor refers to, like the color property of SVG
the target of the link that this node is in, like the href of the SVG a element it is in, null when it is in none
OpenType features of text, like font-feature-settings; font-variant is read into it
values of the axes of variable fonts, like font-variation-settings
the width that the text of a text element wraps to, like the inline-size property of SVG 2
space added after every character of text, like letter-spacing
The lines drawn along text. Unlike CSS, where decorations are drawn in the color of the element that declares them, the lines are drawn in the fill and stroke of the text they are drawn along.
the length that the text of a text element or a tspan is adjusted to, see lengthAdjust
space added to every space between words, like word-spacing
Functions
Renders a vector Composition onto the Drawer. This method applies transformations, styles, and renders the hierarchy of nodes from the given Composition object.
Draws composition in 3D, like composition draws it in 2D, but as triangles: fills are tessellated with openrndr-ktessellation, and strokes are made of the outlines of their segments, joins and caps in the plane of the composition, which are tessellated together so that a translucent stroke is drawn once where it overlaps itself. The composition is in the xy-plane of the model of the drawer, so it can be placed, turned and seen in perspective like any other geometry, with depth testing. Its layers are drawn in their order, without fighting over depth; when the drawer writes depth, the composition is drawn a second time to the depth buffer only.
Draws content into an existing composition using the provided drawing function.
Draws a vector composition by applying a provided drawing function.
Draws a composition within the specified document bounds or an existing composition. This function utilizes a customizable draw function to define the drawing behavior.
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.
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.
Finds first CompositionNode to match the given predicate.
Finds all CompositionNode instances in the current node hierarchy that satisfy the given filter. Traverses the hierarchy recursively, evaluating each node and its children.
find all descendant GroupNode nodes, including potentially this node
find all descendant ImageNode nodes, including potentially this node
find all descendant ShapeNode nodes, including potentially this node
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.
The nodes at point, topmost first, like SVG hit-testing: shapes are hit on their fill and stroke as their pointer-events allow, with their fill rule; text on the cells of its glyphs, images on their rectangle. Nodes that are not displayed, and points outside of clip paths, are not hit. Groups are not hit themselves, the nodes they contain are; CompositionNode.parent leads to them. The point is in the coordinates the composition is drawn in, those of the drawer before the composition is drawn.
the initial value of the property name, the value it has when it is not set and not inherited
true when the property name is inherited by the contents of groups
Merges two lists of ShapeNodeIntersection removing duplicates under the given threshold. Used internally by intersections.
remove node from its parent CompositionNode
The transform that fits viewBox into viewport following aspectRatio, like the viewBox and preserveAspectRatio attributes of SVG. An empty view box hides the contents.
visit this CompositionNode and all descendant nodes and execute visitor