WindfoilDrawer

Draws shapes from a WindfoilMap with the windfoil algorithm. The coverage of a pixel is the box filtered coverage of the shape over the pixel, computed from the winding integral of its curves. Strokes are drawn from the distance to the curves within reach of the stroke.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override var contrast: Double

How much the coverage of edges in dark colors is increased, see org.openrndr.draw.slug.SlugDrawer.contrast

Link copied to clipboard

When larger than 0, coverage is the fraction of exactSamples x exactSamples points in the pixel that are inside the shape according to its fill rule, instead of the winding integral. Slow, meant as a reference.

Link copied to clipboard
open override val instances: VertexBuffer

The instance buffer that commands are prepared in by default

Link copied to clipboard
open override var minificationThreshold: Double

Shapes that are at most this many pixels in width and height are drawn from the winding densities of their bands instead of from their curves, which is faster but approximate. Up to 1.5 times this size the two are blended. Shapes with a stroke are always drawn from their curves. 0.0 draws all shapes from their curves.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard

Creates a map for the boundaries this drawer draws, with curve and band textures of width x height texels

Link copied to clipboard
open override fun createInstanceBuffer(size: Int): VertexBuffer
Link copied to clipboard
open override fun createMap(): WindfoilMap

Creates a map for the boundaries this drawer draws

Link copied to clipboard
open override fun draw(drawer: Drawer, map: BoundaryMap)

Draws the commands last prepared in instances

open override fun draw(drawer: Drawer, map: BoundaryMap, command: BoundaryDrawCommand)

Draws the prepared command with the draw state of drawer

Link copied to clipboard
open override fun prepare(map: BoundaryMap, commands: List<BoundaryCommand>, instances: VertexBuffer = this.instances): WindfoilDrawCommand

Prepares commands in instances