Skip to main content

generator_definition

Function generator_definition 

Source
pub fn generator_definition() -> EffectDef
Expand description

The generator pass.

shape is fill (the fill paint everywhere) or a rectangle or ellipse at center with full size (normalized), turned rotation radians clockwise, with corner radius and stroke_width as fractions of the shorter side. Each paint (fill_*, stroke_*) has a kind, two points a and b (a linear gradient’s start and end; a radial gradient’s centre and, in b.x, radius; a conic gradient’s centre and, in b.x, start angle in radians clockwise from up), a spread, a stop count, stop offsets in offsets0 (first four) and offsets1, and straight sRGB stop colors c0 to c7. Stops interpolate premultiplied in linear light; the output is premultiplied and sRGB-encoded.