AndroidNativeCanvas

KiteCanvas backed by android.graphics.Canvas.

This is the right choice on Android when you don't want Compose: pass a Canvas from your custom View's onDraw(Canvas) override straight into the constructor and the renderer paints into it.

Pair with AndroidPdfBitmapRenderer for the "render a PDF page into a Bitmap" use case.

Blend modes require API 29+ (Paint.setBlendMode). The module's minSdk is 29 to match. See :kitepdf-native build.gradle.kts.

Constructors

Link copied to clipboard
constructor(canvas: Canvas)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun applySoftMask(kind: SoftMask.Kind, maskBBox: Rectangle, maskCtm: Matrix, render: () -> Unit, renderMask: (KiteCanvas) -> Unit)
Link copied to clipboard
open override fun beginPage(widthPt: Double, heightPt: Double, deviceCtm: Matrix)
Link copied to clipboard
open override fun beginTransparencyGroup(bbox: Rectangle, ctm: Matrix, isolated: Boolean, knockout: Boolean, alpha: Double, blendMode: BlendMode)
Link copied to clipboard
open override fun drawGlyphs(glyphs: List<TextGlyph>, fontSize: Double, unitsPerEm: Int, hasOutlines: Boolean, fontSpec: FontSpec, textToDevice: Matrix, color: RgbColor, alpha: Double, blendMode: BlendMode)
Link copied to clipboard
open override fun drawImage(image: ImageXObject, ctm: Matrix, alpha: Double)
Link copied to clipboard
open override fun endPage()
Link copied to clipboard
open override fun endTransparencyGroup()
Link copied to clipboard
open override fun fillPath(path: KitePath, ctm: Matrix, color: RgbColor, evenOdd: Boolean, alpha: Double, blendMode: BlendMode)
Link copied to clipboard
open override fun fillShading(shading: KiteShading, ctm: Matrix, clipPath: KitePath?, alpha: Double, blendMode: BlendMode)
Link copied to clipboard
open override fun popClip()
Link copied to clipboard
open override fun pushClip(path: KitePath, ctm: Matrix, evenOdd: Boolean)
Link copied to clipboard
open override fun strokePath(path: KitePath, ctm: Matrix, color: RgbColor, lineWidth: Double, alpha: Double, blendMode: BlendMode, dashArray: List<Double>?, dashPhase: Double, lineCap: Int, lineJoin: Int, miterLimit: Double)