androidx.ink.brush
Interfaces
TextureBitmapStore |
Interface for a callback to allow the caller to provide a particular |
android
|
Classes
Brush |
Defines how stroke inputs are interpreted to create the visual representation of a stroke. |
Cmn
|
Brush.Builder |
Builder for |
Cmn
|
BrushBehavior |
A behavior describing how stroke input properties should affect the shape and color of the brush tip. |
Cmn
|
BrushCoat |
A |
Cmn
|
BrushCoat.Builder |
Builder for |
Cmn
|
BrushFamily |
A |
Cmn
|
BrushFamily.Builder |
Builder for |
Cmn
|
BrushFamily.InputModel |
Specifies a model for turning a sequence of raw hardware inputs (e.g. from a stylus, touchscreen, or mouse) into a sequence of smoothed, modeled inputs. |
Cmn
|
BrushFamily.InputModel.SlidingWindowModel |
An |
Cmn
|
BrushPaint |
Parameters that control stroke mesh rendering. |
Cmn
|
BrushPaint.ColorFunction |
A |
Cmn
|
BrushPaint.ColorFunction.OpacityMultiplier |
A |
Cmn
|
BrushPaint.ColorFunction.ReplaceColor |
A |
Cmn
|
BrushPaint.StampingTexture |
A texture that is "stamped" onto each particle of the stroke, scaled or rotated appropriately to cover the whole particle. |
Cmn
|
BrushPaint.StampingTexture.Builder |
Builder for |
Cmn
|
BrushPaint.TextureLayer |
Cmn
|
|
BrushPaint.TextureLayer.BlendMode |
The method by which the combined texture layers (index <= i) are blended with the next layer. |
Cmn
|
BrushPaint.TextureLayer.SizeUnit |
Units for specifying |
Cmn
|
BrushPaint.TextureLayer.Wrap |
Wrap modes for specifying |
Cmn
|
BrushPaint.TilingTexture |
A texture layer that will repeat according to a 2D affine transformation of vertex positions. |
Cmn
|
BrushPaint.TilingTexture.Builder |
Builder for |
Cmn
|
BrushPaint.TilingTexture.Origin |
Specification of the origin point to use for the texture. |
Cmn
|
BrushTip |
A |
Cmn
|
BrushTip.Builder |
Builder for |
Cmn
|
InputToolType |
The type of input tool used in producing |
Cmn
|
SelfOverlap |
Specifies how parts of the stroke that intersect itself should be treated during the rendering process. |
Cmn
|
StockBrushes.DashedLineVersion |
Version option for the |
Cmn
|
StockBrushes.EmojiHighlighterVersion |
Version option for the |
Cmn
|
StockBrushes.HighlighterVersion |
Version option for the |
Cmn
|
StockBrushes.MarkerVersion |
Version option for the |
Cmn
|
StockBrushes.PressurePenVersion |
Version option for the |
Cmn
|
Version |
A |
Cmn
|
Objects
Brush.Companion |
Cmn
|
|
BrushFamily.Companion |
Cmn
|
|
StockBrushes |
Provides a fixed set of stock |
Cmn
|
Top-level functions summary
Brush |
@RequiresApi(value = 26)Returns a new |
android
|
Extension functions summary
Brush |
@RequiresApi(value = 26)Creates a copy of |
android
|
Color |
@RequiresApi(value = 26)The brush color as an |
android
|
Brush |
@RequiresApi(value = 26)Returns a new |
android
|
Brush.Builder |
@RequiresApi(value = 26)Set the color on a |
android
|
Top-level functions
createBrushWithAndroidColor
@RequiresApi(value = 26)
fun createBrushWithAndroidColor(
family: BrushFamily,
color: Color,
size: Float,
epsilon: Float
): Brush
Returns a new Brush with the color specified by an android.graphics.Color instance, which can encode several different color spaces. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.
Kotlin callers should prefer Brush.Companion.createWithAndroidColor.
Extension functions
Brush.copyWithAndroidColor
@RequiresApi(value = 26)
fun Brush.copyWithAndroidColor(
color: Color,
family: BrushFamily = this.family,
size: Float = this.size,
epsilon: Float = this.epsilon
): Brush
Creates a copy of this Brush and allows named properties to be altered while keeping the rest unchanged. The color is specified as an android.graphics.Color instance, which can encode several different color spaces. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.
Brush.createAndroidColor
@RequiresApi(value = 26)
fun Brush.createAndroidColor(): Color
The brush color as an android.graphics.Color instance, which can express colors in several different color spaces. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.
Unless an instance of android.graphics.Color is actually needed, prefer to use Brush.colorLong to get the color without causing an allocation, especially in performance-sensitive code. Brush.colorLong is fully compatible with the Long representation of android.graphics.Color.
Brush.Companion.createWithAndroidColor
@RequiresApi(value = 26)
fun Brush.Companion.createWithAndroidColor(
family: BrushFamily,
color: Color,
size: Float,
epsilon: Float
): Brush
Returns a new Brush with the color specified by an android.graphics.Color instance, which can encode several different color spaces. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.
Java callers should prefer BrushUtil.createWithAndroidColor (createBrushWithAndroidColor).
Brush.Builder.setAndroidColor
@RequiresApi(value = 26)
fun Brush.Builder.setAndroidColor(color: Color): Brush.Builder
Set the color on a Brush.Builder as an android.graphics.Color instance. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.