TopBottomShader

class TopBottomShader(var topShader: DynamicShader, var bottomShader: DynamicShader, var splitY: Float = 0.0f) : CacheableDynamicShader

Splits the shaded area into two parts and applies two other DynamicShaders, topShader and bottomShader. splitY expresses the distance of the split from the top of the shaded area as a fraction of the area’s height.

Constructors

Link copied to clipboard
constructor(topShader: DynamicShader, bottomShader: DynamicShader, splitY: Float = 0.0f)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun createShader(context: DrawContext, left: Float, top: Float, right: Float, bottom: Float): Shader

Called when new instance of Shader must be created, as the left, top, right, and bottom bounds have changed or there is no cached Shader.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun getColorAt(point: Point, context: DrawContext, bounds: RectF): Int

Gets the color of the pixel at the given point. bounds specifies the shaded area.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun provideShader(context: DrawContext, left: Float, top: Float, right: Float, bottom: Float): Shader

Creates a Shader by using the provided left, top, right, and bottom bounds.

open fun provideShader(context: DrawContext, bounds: RectF): Shader

Creates a Shader by using the provided bounds.