API reference¶
Reference pages list the public ByteInk declarations, constructor/method parameters, exact source defaults, constants, and returned properties. Required means no default is declared. Nullable types accept null only where shown.
| Package | Reference |
|---|---|
com.vivenotes.byteink.core |
Engine and geometry |
com.vivenotes.byteink.compose |
Input and authoring, rendering and caches |
com.vivenotes.byteink.kit |
Brushes/tools, storage, operations |
com.vivenotes.byteink.nativeloader |
Native loading |
com.vivenotes.byteink.testing |
Notebook/image utilities |
Most constructor parameters declared val are also read-only properties. Standard Kotlin data-class copy, destructuring, equality and hash helpers follow Kotlin semantics. Keep arrays and lists immutable even when their underlying JVM type allows mutation.
Extensions show their receiver before the method name, for example List<PageStroke>.subtract. Import the extension from its package. Companion factories such as SpatialIndex.of and ViveNotebook.open are called on their class.
Rendering/controller diagnostics exposed as var have private setters where noted. InkMeshRenderer.animationTimeMillis has a public setter for advancing texture atlases. Read other state for redraws or diagnostics and mutate through documented methods. Threading and disposal rules are described in the guides.
Parameter tables report defaults declared on that source signature. Kotlin overrides also inherit interface defaults: InkMeshRenderer.render and InkPathRenderer.render inherit strokeToCanvas = AffineTransform.IDENTITY, viewport = null and colorArgb = null from InkRenderer.render.
AndroidX types¶
ByteInk re-exports pinned AndroidX Ink brush, geometry, strokes and storage JVM modules. Their public types retain upstream signatures. The guides use these core inputs:
| Upstream type/call | Parameters used here |
|---|---|
Stroke(brush, inputs) |
Native brush; native input batch in stroke coordinates |
MutableStrokeInputBatch.add(...) |
type, x, y, elapsedTimeMillis; optional strokeUnitLengthCm, pressure, tiltRadians, orientationRadians |
ImmutableAffineTransform(...) |
Six coefficients: x-scale, x-shear, x-translation, y-shear, y-scale, y-translation |
ImmutableBox.fromTwoPoints(...) |
Two vectors bounding the query rectangle |
Use monotonic relative millisecond input times, finite coordinates, and constant tool/optional-property availability within a native batch. Native brush width and epsilon must be finite and positive, with width at least epsilon. See the pinned-source contracts before changing input properties.
Upstream references: Stroke, MutableStrokeInputBatch, Brush, AffineTransform. Online references can describe newer versions; the dependency's alpha06 API is authoritative.
The generated pages intentionally cover ByteInk's own public API. AndroidX internal JNI annotations and test-only native-pointer hooks are upstream implementation details.