Vello

GPU-accelerated 2D renderer powered by Vello, capable of rendering vector scenes to pixel buffers with configurable antialiasing.

Module: elide.Vello Support: Experimental

Interface VelloRenderer

GPU-accelerated 2D renderer powered by Vello, capable of rendering vector scenes to pixel buffers with configurable antialiasing.

3 members: 3 undocumented

Static Methods

⚪ create(options)
Creates a new renderer, asynchronously initializing GPU resources.

Methods

⚪ renderToBuffer(scene, params)
Renders a scene to an RGBA pixel buffer at the given dimensions.
⚪ destroy()
Releases GPU resources held by this renderer.

---

Dictionary VelloRendererOptions

Creates a new renderer, asynchronously initializing GPU resources.

1 members: 1 undocumented

Properties

⚪ antialiasing
Configuration options for creating a VelloRenderer.

---

Enum VelloAntialiasing

The antialiasing method to use for rendering.
ValueDescription
area
msaa8
msaa16

Interface VelloScene

Renders a scene to an RGBA pixel buffer at the given dimensions.

8 members: 8 undocumented

Constructors

⚪ constructor()
Creates a new empty scene.

Static Methods

⚪ fromSVG(svg)
Parses an SVG string and returns a new VelloScene containing the rendered result.

Methods

⚪ fill(fillRule, transform, brush, shape)
Parses an SVG string and returns a new VelloScene containing the rendered result.
⚪ stroke(style, transform, brush, shape)
Fills a shape using the given fill rule, transform, and brush.
⚪ pushLayer(blend, alpha, transform, clip)
Pushes a new compositing layer with the given blend mode, opacity, transform, and clip shape.
⚪ popLayer()
Pops the most recently pushed compositing layer, flattening it into its parent.
⚪ append(other, transform)
Appends all drawing commands from another scene into this one, with an optional transform.
⚪ reset()
Clears all drawing commands from this scene.

---

Dictionary VelloRenderParams

Renders a scene to an RGBA pixel buffer at the given dimensions.

3 members: 3 undocumented

Properties

⚪ width
→ u32
⚪ height
Height of the output image in pixels.
⚪ backgroundColor
Background color to clear the image with before rendering.

---

Enum VelloFill

Fills a shape using the given fill rule, transform, and brush.
ValueDescription
nonzero
evenodd

Interface VelloAffine

Fills a shape using the given fill rule, transform, and brush.

15 members: 15 undocumented

Constructors

⚪ constructor(a, b, c, d, e, f)
Creates a new empty scene.

Static Methods

⚪ identity()
Creates an affine transform from the six matrix coefficients [a b c d e f].
⚪ translate(x, y)
Returns a translation transform by (x, y).
⚪ scale(s)
Returns a uniform scaling transform by factor s.
⚪ scaleNonUniform(sx, sy)
Returns a non-uniform scaling transform by (sx, sy).
⚪ rotate(radians)
Returns a rotation transform by the given angle in radians.
⚪ skew(kx, ky)
Returns a rotation transform by the given angle in radians.

Methods

⚪ then(other)
Returns the composition of this transform followed by another (this * other).
⚪ inverse()
Returns the composition of this transform followed by another (this * other).

Properties

⚪ a
Creates a new renderer, asynchronously initializing GPU resources.
⚪ b
A 2D affine transformation matrix [a b c d e f] supporting translation, rotation,
⚪ c
→ f64
⚪ d
A 2D affine transformation matrix [a b c d e f] supporting translation, rotation,
⚪ e
→ f64
⚪ f
Creates an affine transform from the six matrix coefficients [a b c d e f].

---

Interface VelloColor

Background color to clear the image with before rendering.

8 members: 8 undocumented

Constructors

⚪ constructor(r, g, b, a)
Creates a new empty scene.

Static Methods

⚪ rgb(r, g, b)
Creates an opaque color from red, green, and blue components.
⚪ rgba(r, g, b, a)
Creates a color from red, green, blue, and alpha components.
⚪ hex(value)
Creates a color from red, green, blue, and alpha components.

Properties

⚪ r
→ f32
⚪ g
Creates a color from red, green, blue, and optional alpha components.
⚪ b
A 2D affine transformation matrix [a b c d e f] supporting translation, rotation,
⚪ a
Creates a new renderer, asynchronously initializing GPU resources.

---

Interface VelloBrush

Fills a shape using the given fill rule, transform, and brush.

---

Interface VelloShape

Fills a shape using the given fill rule, transform, and brush.

---

Interface VelloCircle

A circle shape defined by its center point and radius.

4 members: 4 undocumented

Constructors

⚪ constructor(cx, cy, radius)
Creates a new empty scene.

Properties

⚪ cx
A circle shape defined by its center point and radius.
⚪ cy
A circle shape defined by its center point and radius.
⚪ radius
→ f64

---

Interface VelloRect

An axis-aligned rectangle defined by its two opposite corner points.

5 members: 5 undocumented

Constructors

⚪ constructor(x0, y0, x1, y1)
Creates a new empty scene.

Properties

⚪ x0
An axis-aligned rectangle defined by its two opposite corner points.
⚪ y0
An axis-aligned rectangle defined by its two opposite corner points.
⚪ x1
An axis-aligned rectangle defined by its two opposite corner points.
⚪ y1
An axis-aligned rectangle defined by its two opposite corner points.

---

Interface VelloRoundedRect

An axis-aligned rectangle with uniformly rounded corners.

6 members: 6 undocumented

Constructors

⚪ constructor(x0, y0, x1, y1, radius)
Creates a new empty scene.

Properties

⚪ x0
An axis-aligned rectangle defined by its two opposite corner points.
⚪ y0
An axis-aligned rectangle defined by its two opposite corner points.
⚪ x1
An axis-aligned rectangle defined by its two opposite corner points.
⚪ y1
An axis-aligned rectangle defined by its two opposite corner points.
⚪ radius
→ f64

---

Interface VelloLine

A straight line segment between two points.

5 members: 5 undocumented

Constructors

⚪ constructor(x0, y0, x1, y1)
Creates a new empty scene.

Properties

⚪ x0
An axis-aligned rectangle defined by its two opposite corner points.
⚪ y0
An axis-aligned rectangle defined by its two opposite corner points.
⚪ x1
An axis-aligned rectangle defined by its two opposite corner points.
⚪ y1
An axis-aligned rectangle defined by its two opposite corner points.

---

Interface VelloEllipse

An ellipse defined by its center, radii, and optional rotation.

6 members: 6 undocumented

Constructors

⚪ constructor(cx, cy, rx, ry, rotation)
Creates a new empty scene.

Properties

⚪ cx
A circle shape defined by its center point and radius.
⚪ cy
A circle shape defined by its center point and radius.
⚪ rx
An ellipse defined by its center, radii, and optional rotation.
⚪ ry
An ellipse defined by its center, radii, and optional rotation.
⚪ rotation
Returns a non-uniform scaling transform by (sx, sy).

---

Interface VelloPath

A builder for arbitrary vector paths composed of lines, quadratic, and cubic Bezier segments.

6 members: 6 undocumented

Constructors

⚪ constructor()
Creates a new empty scene.

Methods

⚪ moveTo(x, y)
Begins a new subpath at the given point.
⚪ lineTo(x, y)
Adds a straight line segment from the current point to (x, y).
⚪ quadTo(cx, cy, x, y)
Adds a quadratic Bezier curve with control point (cx, cy) and endpoint (x, y).
⚪ curveTo(c1x, c1y, c2x, c2y, x, y)
Adds a cubic Bezier curve with control points (c1x, c1y) and (c2x, c2y) and endpoint (x, y).
⚪ close()
Closes the current subpath by drawing a straight line back to its start.

---

Interface VelloStroke

Strokes a shape outline using the given stroke style, transform, and brush.

6 members: 6 undocumented

Constructors

⚪ constructor(width, options)
Creates a new empty scene.

Properties

⚪ width
→ f64
⚪ join
→ string
⚪ miterLimit
The miter limit ratio; joins exceeding this are beveled instead.
⚪ startCap
The cap style for the start of open subpaths (`"butt"`, `"square"`, or `"round"`).
⚪ endCap
The cap style for the end of open subpaths (`"butt"`, `"square"`, or `"round"`).

---

Dictionary VelloStrokeOptions

Creates a stroke style with the given width and optional join/cap settings.

4 members: 4 undocumented

Properties

⚪ join
→ VelloLineJoin
⚪ miterLimit
The miter limit ratio; joins exceeding this are beveled instead.
⚪ startCap
The cap style for the start of open subpaths (`"butt"`, `"square"`, or `"round"`).
⚪ endCap
The cap style for the end of open subpaths (`"butt"`, `"square"`, or `"round"`).

---

Enum VelloLineJoin

The line join style for corners.
ValueDescription
bevel
miter
round

Enum VelloLineCap

The cap style applied to the start of open subpaths.
ValueDescription
butt
square
round

Interface VelloGradient

Base interface for gradient brushes (linear, radial, and sweep).

---

Interface VelloLinearGradient

A gradient that interpolates colors along a straight line from a start point to an end point.

1 members: 1 undocumented

Constructors

⚪ constructor(sx, sy, ex, ey, stops, options)
Creates a new empty scene.

---

Interface VelloRadialGradient

A gradient that interpolates colors radiating outward from a center point.

1 members: 1 undocumented

Constructors

⚪ constructor(cx, cy, radius, stops, options)
Creates a new empty scene.

---

Interface VelloSweepGradient

A gradient that interpolates colors along an angular sweep around a center point.

1 members: 1 undocumented

Constructors

⚪ constructor(cx, cy, startAngle, endAngle, stops, options)
Creates a new empty scene.

---

Dictionary VelloColorStop

Creates a linear gradient from (sx, sy) to (ex, ey) with the given color stops.

2 members: 2 undocumented

Properties

⚪ offset
→ f32
⚪ color
Height of the output image in pixels.

---

Dictionary VelloGradientOptions

Creates a linear gradient from (sx, sy) to (ex, ey) with the given color stops.

1 members: 1 undocumented

Properties

⚪ extend
How the gradient extends beyond its defined region.

---

Enum VelloExtend

How the gradient extends beyond its defined region.
ValueDescription
pad
repeat
reflect

Interface VelloBlendMode

Pushes a new compositing layer with the given blend mode, opacity, transform, and clip shape.

4 members: 4 undocumented

Constructors

⚪ constructor(mix, compose)
Creates a new empty scene.

Static Methods

⚪ normal()
Creates a blend mode from a mix function and an optional compositing operator.
⚪ multiply()
Returns the standard normal blend mode (source over destination).
⚪ screen()
Returns the multiply blend mode (darkens by multiplying color channels).

---

Enum VelloMix

Creates a blend mode from a mix function and an optional compositing operator.
ValueDescription
normal
multiply
screen
overlay
darken
lighten
color-dodge
color-burn
hard-light
soft-light
difference
exclusion
hue
saturation
color
luminosity

Enum VelloCompose

Creates a blend mode from a mix function and an optional compositing operator.
ValueDescription
clear
copy
dest
src-over
dest-over
src-in
dest-in
src-out
dest-out
src-atop
dest-atop
xor
plus
plus-lighter