WindfoilMap

class WindfoilMap(val curves: ColorBuffer, val rows: ColorBuffer) : BoundaryMap(source)

GPU storage for shapes drawn with the windfoil algorithm, which computes the box filtered coverage of a pixel from the winding integral of the curves of a shape over the pixel. Shapes are split in pieces that are monotone in x and y, which are filed in horizontal bands.

curves holds three texels per piece (start, control and end point) and must be an RG FLOAT32 color buffer. rows holds two texels per band and must be an RGBa UINT32_INT color buffer, with the first piece and the number of pieces of the band, and the ink profile of the band: its winding density and the x range of its pieces. Both are addressed as flat arrays in rows of the width of the color buffer.

Constructors

Link copied to clipboard
constructor(curves: ColorBuffer, rows: ColorBuffer)

Types

Link copied to clipboard
object Companion

Properties

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

Functions

Link copied to clipboard
open override fun addShape(shape: Shape, fillRule: FillRule = FillRule.NON_ZERO, quadraticTolerance: Double = 1.0): Int

Adds shape and returns its index. Open contours are closed, like contours of filled shapes in SVG.

Link copied to clipboard
open override fun endBatch()
Link copied to clipboard
open override fun startBatch()

Starts a batch, in which shapes are uploaded to the GPU once endBatch is called instead of after each shape