Header menu logo Nu

Contour Module

Contour operations. TODO: P0: get rid of excess frame-based allocation here, such as potentially by using memoization. TODO: see if it won't be too disruptive to make this code conform to our code standard.

Functions and values

Function or value Description

Contour.make fill stroke commands scale

Full Usage: Contour.make fill stroke commands scale

Parameters:
Returns: Contour

Prepare a contour for two-pass rendering with optional fill and optional stroke geometries.

fill : ContourFill
stroke : ContourStroke
commands : ContourCommand seq
scale : Vector2
Returns: Contour

Contour.packCurvesGPU curves

Full Usage: Contour.packCurvesGPU curves

Parameters:
Returns: Vector4 array

Pack an array of ContourCurves into a flat float4 array for GPU upload.

curves : ContourCurve array
Returns: Vector4 array

Type something to start searching.