DrawStyle

data class DrawStyle(    var clip: Rectangle? = null,     var fill: ColorRGBa? = ColorRGBa.WHITE,     var stroke: ColorRGBa? = ColorRGBa.BLACK,     var lineCap: LineCap = LineCap.BUTT,     var lineJoin: LineJoin = LineJoin.MITER,     var strokeWeight: Double = 1.0,     var smooth: Boolean = true,     var miterLimit: Double = 4.0,     var quality: DrawQuality = DrawQuality.QUALITY,     var depthTestPass: DepthTestPass = DepthTestPass.ALWAYS,     var depthWrite: Boolean = false,     var blendMode: BlendMode = BlendMode.OVER,     var cullTestPass: CullTestPass = CullTestPass.ALWAYS,     var channelWriteMask: ChannelMask = ChannelMask(red = true, green = true, blue = true, alpha = true),     var alphaToCoverage: Boolean = false,     var shadeStyle: ShadeStyle? = null,     var fontMap: FontMap? = null,     var kerning: KernMode = KernMode.METRIC,     var textSetting: TextSettingMode = TextSettingMode.PIXEL,     var stencil: StencilStyle = StencilStyle(),     var frontStencil: StencilStyle = stencil,     var backStencil: StencilStyle = stencil,     var colorMatrix: Matrix55 = Matrix55.IDENTITY)

A data class that controls the look of drawing operations including stroke and fill color, stroke weight and more.

Constructors

Link copied to clipboard
fun DrawStyle(    clip: Rectangle? = null,     fill: ColorRGBa? = ColorRGBa.WHITE,     stroke: ColorRGBa? = ColorRGBa.BLACK,     lineCap: LineCap = LineCap.BUTT,     lineJoin: LineJoin = LineJoin.MITER,     strokeWeight: Double = 1.0,     smooth: Boolean = true,     miterLimit: Double = 4.0,     quality: DrawQuality = DrawQuality.QUALITY,     depthTestPass: DepthTestPass = DepthTestPass.ALWAYS,     depthWrite: Boolean = false,     blendMode: BlendMode = BlendMode.OVER,     cullTestPass: CullTestPass = CullTestPass.ALWAYS,     channelWriteMask: ChannelMask = ChannelMask(red = true, green = true, blue = true, alpha = true),     alphaToCoverage: Boolean = false,     shadeStyle: ShadeStyle? = null,     fontMap: FontMap? = null,     kerning: KernMode = KernMode.METRIC,     textSetting: TextSettingMode = TextSettingMode.PIXEL,     stencil: StencilStyle = StencilStyle(),     frontStencil: StencilStyle = stencil,     backStencil: StencilStyle = stencil,     colorMatrix: Matrix55 = Matrix55.IDENTITY)

Functions

Link copied to clipboard
fun applyToShader(shader: Shader)

Properties

Link copied to clipboard
var alphaToCoverage: Boolean = false

Use alpha to coverage in rendering, used in multi-sampling modes

Link copied to clipboard
var backStencil: StencilStyle
Link copied to clipboard
var blendMode: BlendMode
Link copied to clipboard
var channelWriteMask: ChannelMask
Link copied to clipboard
var clip: Rectangle? = null

Clipping rectangle, set to null for no clipping

Link copied to clipboard
var colorMatrix: Matrix55
Link copied to clipboard
var cullTestPass: CullTestPass
Link copied to clipboard
var depthTestPass: DepthTestPass
Link copied to clipboard
var depthWrite: Boolean = false
Link copied to clipboard
var fill: ColorRGBa?

Fill color, set to null for no fill

Link copied to clipboard
var fontMap: FontMap? = null
Link copied to clipboard
var frontStencil: StencilStyle
Link copied to clipboard
var kerning: KernMode
Link copied to clipboard
var lineCap: LineCap
Link copied to clipboard
var lineJoin: LineJoin
Link copied to clipboard
var miterLimit: Double = 4.0
Link copied to clipboard
var quality: DrawQuality
Link copied to clipboard
var shadeStyle: ShadeStyle? = null
Link copied to clipboard
var smooth: Boolean = true
Link copied to clipboard
var stencil: StencilStyle
Link copied to clipboard
var stroke: ColorRGBa?

Stroke color, set to null for no stroke

Link copied to clipboard
var strokeWeight: Double = 1.0
Link copied to clipboard
var textSetting: TextSettingMode

Sources

Link copied to clipboard