{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

TileMode

value public final class TileMode


Defines what happens at the edge of the gradient. A gradient is defined along a finite inner area. In the case of a linear gradient, it's between the parallel lines that are orthogonal to the line drawn between two points. In the case of radial gradients, it's the disc that covers the circle centered on a particular point up to a given radius.

This enum is used to define how the gradient should paint the regions outside that defined inner area.

See also: LinearGradientShader, RadialGradientShader which works in relative coordinates and can create a Shader representing the gradient for a particular Rect on demand.

Summary

Nested types

public static class TileMode.Companion

Public methods

@NonNull String

Extension functions

final @NonNull Shader.TileMode
final boolean

Capability query to determine if the particular platform supports the TileMode.

Public methods

toString

public @NonNull String toString()

Extension functions

AndroidTileModeKt.toAndroidTileMode

public final @NonNull Shader.TileMode AndroidTileModeKt.toAndroidTileMode(@NonNull TileMode receiver)

TileModeKt.isSupported

public final boolean TileModeKt.isSupported(@NonNull TileMode receiver)

Capability query to determine if the particular platform supports the TileMode. Not all platforms support all tile mode algorithms, however, TileMode.Clamp, TileMode.Repeated and TileMode.Mirror are guaranteed to be supported. If a TileMode that is not supported is used, the default of TileMode.Clamp is consumed instead.