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.SUBPIXEL, var stencil: StencilStyle = StencilStyle(), var frontStencil: StencilStyle = stencil, var backStencil: StencilStyle = stencil, var colorMatrix: Matrix55 = Matrix55.IDENTITY)(source)

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

Constructors

Link copied to clipboard
constructor(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.SUBPIXEL, 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

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

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Clipping rectangle, set to null for no clipping

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Fill color, set to null for no fill

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Stroke color, set to null for no stroke

Link copied to clipboard
Link copied to clipboard