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
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

BrushFamily.encode

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. If hasFallbacks is true, then the stored, proto message including fallbacks for this BrushFamily will be used instead of recomputing the proto from the BrushFamily object.

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.

BrushFamily.encode

fun BrushFamily.encode(output: OutputStream): Unit

Write a gzip-compressed serialized ink.proto.BrushFamily proto message representing the BrushFamily to the given OutputStream. If hasFallbacks is true, then the stored, proto message including fallbacks for this BrushFamily will be used instead of recomputing the proto from the BrushFamily object.