Context2d
open class Context2d(val renderer: Renderer, val defaultFontRegistry: FontRegistry? = null, val defaultFont: Font? = null) : VectorBuilder, Disposable
Inheritors
Constructors
Link copied to clipboard
                  constructor(renderer: Renderer, defaultFontRegistry: FontRegistry? = null, defaultFont: Font? = null)
Types
Link copied to clipboard
                  Link copied to clipboard
                  data class State(var transform: Matrix = Matrix.IDENTITY, var clip: VectorPath? = null, var path: VectorPath = VectorPath(), var lineScaleMode: LineScaleMode = LineScaleMode.NORMAL, var lineWidth: Double = 1.0, var startLineCap: LineCap = LineCap.BUTT, var endLineCap: LineCap = LineCap.BUTT, var lineJoin: LineJoin = LineJoin.MITER, var miterLimit: Double = 10.0, var strokeStyle: Paint = DefaultPaint, var fillStyle: Paint = DefaultPaint, var fontRegistry: FontRegistry? = null, var font: Font? = null, var fontSize: Double = 24.0, var verticalAlign: VerticalAlign = VerticalAlign.BASELINE, var horizontalAlign: HorizontalAlign = HorizontalAlign.LEFT, var globalAlpha: Double = 1.0, var globalCompositeOperation: CompositeOperation = CompositeMode.SOURCE_OVER, var lineDash: DoubleList? = null, var lineDashOffset: Double = 0.0)
Properties
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
                  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
                  Functions
Link copied to clipboard
                  Link copied to clipboard
                  fun VectorBuilder.cfrCubicTo(cx1: Double, cy1: Double, cx2: Double, cy2: Double, ax: Double, ay: Double)
Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  inline fun clip(path: VectorPath.() -> Unit, winding: Winding = Winding.NON_ZERO, block: () -> Unit)
Link copied to clipboard
                  Link copied to clipboard
                  inline fun createLinearGradient(x0: Number, y0: Number, x1: Number, y1: Number, cycle: CycleMethod = CycleMethod.NO_CYCLE, transform: Matrix = Matrix.IDENTITY, block: GradientPaint.() -> Unit = {}): GradientPaint
Link copied to clipboard
                  fun createPattern(bitmap: Bitmap, repeat: Boolean = false, smooth: Boolean = true, transform: Matrix = Matrix.IDENTITY): BitmapPaint
fun createPattern(bitmap: Bitmap, cycleX: CycleMethod = CycleMethod.NO_CYCLE, cycleY: CycleMethod = cycleX, smooth: Boolean = true, transform: Matrix = Matrix.IDENTITY): BitmapPaint
Link copied to clipboard
                  inline fun createRadialGradient(x0: Number, y0: Number, r0: Number, x1: Number, y1: Number, r1: Number, cycle: CycleMethod = CycleMethod.NO_CYCLE, transform: Matrix = Matrix.IDENTITY, block: GradientPaint.() -> Unit = {}): GradientPaint
Link copied to clipboard
                  inline fun createSweepGradient(x0: Number, y0: Number, startAngle: Angle = Angle.ZERO, transform: Matrix = Matrix.IDENTITY, block: GradientPaint.() -> Unit = {}): GradientPaint
Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  fun Context2d.drawRichText(text: RichTextData, bounds: Rectangle = Rectangle(0, 0, width, height), wordWrap: Boolean = true, includePartialLines: Boolean = false, ellipsis: String? = null, fill: Paint? = null, stroke: Stroke? = null, align: TextAlignment = TextAlignment.TOP_LEFT, includeFirstLineAlways: Boolean = true, textRangeStart: Int = 0, textRangeEnd: Int = Int.MAX_VALUE): Int
Link copied to clipboard
                  fun drawShape(shape: Drawable, rasterizerMethod: ShapeRasterizerMethod = ShapeRasterizerMethod.X4, native: Boolean = true)
Link copied to clipboard
                  fun <T> drawText(text: T, pos: Point = Point.ZERO, fill: Boolean = true, paint: Paint? = null, font: Font? = this.font, size: Double = this.fontSize, renderer: TextRenderer<T> = DefaultStringTextRenderer as TextRenderer<T>, align: TextAlignment = this.alignment, outMetrics: TextMetricsResult? = null, fillStyle: Paint? = null, stroke: Stroke? = null, textRangeStart: Int = 0, textRangeEnd: Int = Int.MAX_VALUE): TextMetricsResult?
Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  inline fun fillStroke(fill: Paint?, stroke: Paint?, strokeInfo: StrokeInfo? = null, callback: () -> Unit = {})
Link copied to clipboard
                  fun getTextBounds(text: String, out: TextMetrics = TextMetrics(), fontSize: Double = this.fontSize, renderer: TextRenderer<String> = DefaultStringTextRenderer, align: TextAlignment = this.alignment): TextMetrics
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
                  Link copied to clipboard
                  inline fun stroke(paint: Paint?, info: StrokeInfo?, begin: Boolean = true, callback: () -> Unit = {})
inline fun stroke(paint: Paint, lineWidth: Number = this.lineWidth, lineCap: LineCap = this.lineCap, lineJoin: LineJoin = this.lineJoin, miterLimit: Number = this.miterLimit, lineDash: DoubleList? = this.lineDash, lineDashOffset: Number = this.lineDashOffset, begin: Boolean = true, callback: () -> Unit = {})
Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  fun <T> VectorBuilder.text(text: T, font: VectorFont, textSize: Double = 16.0, pos: Point = Point.ZERO, align: TextAlignment = TextAlignment.BASELINE_LEFT, renderer: TextRenderer<T> = DefaultStringTextRenderer as TextRenderer<T>)
Link copied to clipboard
                  Link copied to clipboard