PaintStyle

class PaintStyle(val fill: PaintLayer?, val stroke: PaintLayer?) : ShadeStyle(source)

A shade style that paints the fills and strokes of shapes with sources, such as gradients: the color of the source replaces the color of the fill or stroke, their alpha multiplies. A fill or stroke without a paint keeps its color. All PaintUnits work for shapes, contours, circles and rectangles, also drawn in batches.

PaintUnits.BOUNDS reads c_boundsPosition. For shapes, a paint over the bounds of a shape can be drawn in PaintUnits.OBJECT units with a transform that maps 0..1 to the bounds, see boundsTransform.

Constructors

Link copied to clipboard
constructor(fill: PaintLayer?, stroke: PaintLayer?)

Properties

Link copied to clipboard
var attributes: MutableList<VertexBuffer>
Link copied to clipboard
open override val bufferAccess: MutableMap<String, BufferAccess>
Link copied to clipboard
open override val bufferFlags: MutableMap<String, Set<BufferFlag>>
Link copied to clipboard
open override val buffers: MutableMap<String, String>
Link copied to clipboard
open override val bufferTypes: MutableMap<String, String>
Link copied to clipboard
open override var bufferValues: MutableMap<String, Any>
Link copied to clipboard
open var dirty: Boolean
Link copied to clipboard
Link copied to clipboard
var fillTransform: Matrix44

The transform of the fill paint, which replaces the transform of fill. Changing it does not compile another shader, shapes with different transforms can share a paint style.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val imageAccess: MutableMap<String, ImageAccess>
Link copied to clipboard
open override val imageArrayLength: MutableMap<String, Int>
Link copied to clipboard
open override val imageBindings: MutableMap<String, Int>
Link copied to clipboard
open override val imageFlags: MutableMap<String, Set<ImageFlag>>
Link copied to clipboard
open override val imageTypes: MutableMap<String, String>
Link copied to clipboard
open override val imageValues: MutableMap<String, Array<out ImageBinding>>
Link copied to clipboard
var libraries: List<GlslLibrary>
Link copied to clipboard
var outputs: ObservableHashmap<String, ShadeStyleOutput>
Link copied to clipboard
open override var parameterTypes: ObservableHashmap<String, String>
Link copied to clipboard
open override var parameterValues: MutableMap<String, Any>
Link copied to clipboard
Link copied to clipboard
var strokeTransform: Matrix44

the transform of the stroke paint, which replaces the transform of stroke, see fillTransform

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override var textureBaseIndex: Int
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun attributes(attributesBuffer: VertexBuffer)
Link copied to clipboard
open fun buffer(name: String, buffer: AtomicCounterBuffer)
open fun buffer(name: String, buffer: CommandBuffer<Command>)
open fun buffer(name: String, buffer: CommandBuffer<IndexedCommand>)
open fun buffer(name: String, buffer: IndexBuffer)
open fun buffer(name: String, buffer: ShaderStorageBuffer)
Link copied to clipboard
open fun image(name: String, values: Array<out ImageBinding>)
open fun image(name: String, value: ImageBinding)
open fun image(name: String, arrayTextures: Array<ArrayTexture>, levels: Array<Int>)
open fun image(name: String, colorBuffers: Array<ColorBuffer>, levels: Array<Int>)
open fun image(name: String, cubemaps: Array<Cubemap>, levels: Array<Int>)
open fun image(name: String, volumeTextures: Array<VolumeTexture>, levels: Array<Int>)
open fun image(name: String, arrayCubemap: ArrayCubemap, level: Int)
open fun image(name: String, arrayTexture: ArrayTexture, level: Int)
open fun image(name: String, colorBuffer: ColorBuffer, level: Int)
open fun image(name: String, cubemap: Cubemap, level: Int)
open fun image(name: String, volumeTexture: VolumeTexture, level: Int)
Link copied to clipboard
open fun imageBindingType(value: ImageBinding): String
Link copied to clipboard
fun output(name: String, output: ShadeStyleOutput)
Link copied to clipboard
open fun <R : Any> Parameter(customName: String?, initialValue: R?): Parameter<R>
Link copied to clipboard
open fun parameter(name: String, value: ImageBinding)
open fun parameter(name: String, value: Array<ColorRGBa>)
open fun parameter(name: String, value: Array<Matrix33>)
open fun parameter(name: String, value: Array<Matrix44>)
open fun parameter(name: String, value: Array<Vector2>)
open fun parameter(name: String, value: Array<Vector3>)
open fun parameter(name: String, value: Array<Vector4>)
open fun parameter(name: String, value: Boolean)
open fun parameter(name: String, value: Double)
open fun parameter(name: String, value: DoubleArray)
open fun parameter(name: String, value: Float)
open fun parameter(name: String, value: Int)
open fun parameter(name: String, value: IntArray)
open fun parameter(name: String, value: ColorRGBa)
open fun parameter(name: String, value: ArrayCubemap)
open fun parameter(name: String, value: ArrayTexture)
open fun parameter(name: String, value: BufferTexture)
open fun parameter(name: String, value: ColorBuffer)
open fun parameter(name: String, value: Cubemap)
open fun parameter(name: String, value: DepthBuffer)
open fun parameter(name: String, value: DynamicParameter)
open fun parameter(name: String, value: DynamicParameterSource)
open fun parameter(name: String, value: VolumeTexture)
open fun parameter(name: String, value: BooleanVector2)
open fun parameter(name: String, value: BooleanVector3)
open fun parameter(name: String, value: BooleanVector4)
open fun parameter(name: String, value: IntVector2)
open fun parameter(name: String, value: IntVector3)
open fun parameter(name: String, value: IntVector4)
open fun parameter(name: String, value: Matrix33)
open fun parameter(name: String, value: Matrix44)
open fun parameter(name: String, value: Vector2)
open fun parameter(name: String, value: Vector3)
open fun parameter(name: String, value: Vector4)
Link copied to clipboard
Link copied to clipboard
operator fun plus(other: ShadeStyle): ShadeStyle
Link copied to clipboard
fun <P : Preset> StyleParameters.presetSlot(name: String, contract: GlslContract, initial: P): PresetSlot<P>

A slot for presets with contract, set as parameter name. Annotate the property with @NestedParameter to show the parameters of the preset in user interfaces:

Link copied to clipboard
open fun StyleImageBindings.registerImageBinding(name: String, access: ImageAccess, flags: Set<ImageFlag>, arrayLength: Int)
Link copied to clipboard
fun StyleParameters.setFxContext(time: Double, frame: Int, resolution: Vector2)

Sets the values of fxContextLibrary: the time in seconds, the number of the frame and the resolution of the image in pixels. For a shade style or a filter whose shader reads them or includes FX_CONTEXT_USE.