SlugDrawer

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. At 1.0 the edges of dark colors look as heavy as when they are blended in sRGB, at 0.0 coverage is blended in linear light uncorrected, values above 1.0 increase the coverage further. The correction makes small type and thin lines in dark colors look closer to how browsers and other text renderers draw them. It fades out between dark and light colors, light colors are not corrected.

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 ink of their horizontal bands instead of from their curves, which is faster and averages the ink of the shape over the pixels it covers. Up to 1.5 times this size the two are blended, so shapes change smoothly when they are scaled. Shapes with a stroke are always drawn from their curves. 0.0 draws all shapes from their curves.

Link copied to clipboard

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(): SlugMap

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): SlugDrawCommand

Prepares commands in instances