BrushFamily



A BrushFamily describes a family of brushes (e.g. “highlighter” or “pressure pen”), irrespective of their size or color.

For now, BrushFamily is an opaque type that can only be instantiated via StockBrushes. A future version of this module will allow creating fully custom BrushFamily objects.

BrushFamily objects are immutable.

Summary

Nested types

Public functions

open operator Boolean
equals(other: Any?)
android
open Int
android
open String
android

Protected functions

Unit

Deletes native BrushFamily memory.

android

Extension functions

Unit
@ExperimentalInkCustomBrushApi
BrushFamily.encode(
    output: OutputStream,
    textureBitmapStore: TextureBitmapStore
)

Write a gzip-compressed ink.proto.BrushFamily binary proto message representing the BrushFamily to the given OutputStream.

android
Unit

Write a gzip-compressed serialized ink.proto.BrushFamily proto message representing the BrushFamily to the given OutputStream.

android

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Protected functions

finalize

protected fun finalize(): Unit

Deletes native BrushFamily memory.

Extension functions

encode

@ExperimentalInkCustomBrushApi
fun BrushFamily.encode(
    output: OutputStream,
    textureBitmapStore: TextureBitmapStore
): Unit

Write a gzip-compressed ink.proto.BrushFamily binary proto message representing the BrushFamily to the given OutputStream.

Parameters
BrushFamily

The BrushFamily object to encode.

output: OutputStream

The OutputStream to write the gzip-compressed encoded bytes to.

textureBitmapStore: TextureBitmapStore

The TextureBitmapStore to use to encode the texture images within the encoded BrushFamily. If this is not desired behavior, e.g. if the application has a static set of texture images that it includes as resources, then this can be a TextureBitmapStore that always returns null.

encode

@ExperimentalInkCustomBrushApi
fun BrushFamily.encode(output: OutputStream): Unit

Write a gzip-compressed serialized ink.proto.BrushFamily proto message representing the BrushFamily to the given OutputStream.