DrawStyle

data class DrawStyle(clip: Rectangle?, fill: ColorRGBa?, stroke: ColorRGBa?, lineCap: LineCap, lineJoin: LineJoin, strokeWeight: Double, smooth: Boolean, miterLimit: Double, quality: DrawQuality, depthTestPass: DepthTestPass, depthWrite: Boolean, blendMode: BlendMode, cullTestPass: CullTestPass, channelWriteMask: ChannelMask, alphaToCoverage: Boolean, shadeStyle: ShadeStyle?, fontMap: FontMap?, kerning: KernMode, textSetting: TextSettingMode, stencil: StencilStyle, frontStencil: StencilStyle, backStencil: StencilStyle, colorMatrix: Matrix55)

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

Constructors

DrawStyle
Link copied to clipboard
common
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

applyToShader
Link copied to clipboard
common
fun applyToShader(shader: Shader)

Properties

alphaToCoverage
Link copied to clipboard
common
var alphaToCoverage: Boolean = false

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

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

Clipping rectangle, set to null for no clipping

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

Fill color, set to null for no fill

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

Stroke color, set to null for no stroke

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