Package-level declarations

Types

Link copied to clipboard
value class Bitmask(value: Int = 0)
Link copied to clipboard
sealed interface HazeBlendMode

Sealed interface representing supported blend modes for platform operations.

Link copied to clipboard
@RequiresOptIn(message = "This is an internal Haze API and should not be used outside of the library. It may be changed or removed without notice.")
annotation class InternalHazeApi
Link copied to clipboard
actual typealias PlatformColorFilter = ColorFilter

Platform-specific color filter type.

expect class PlatformColorFilter

Platform-specific color filter type.

actual typealias PlatformColorFilter = ColorFilter
typealias PlatformColorFilter = ColorFilter

Platform-specific color filter type.

Link copied to clipboard
actual typealias PlatformContext = Context
expect abstract class PlatformContext
actual abstract class PlatformContext
Link copied to clipboard

Platform-specific render effect type.

Platform-specific render effect type.

actual typealias PlatformRenderEffect = ImageFilter
typealias PlatformRenderEffect = ImageFilter

Platform-specific render effect type.

Link copied to clipboard
actual class PlatformRuntimeEffect(sksl: String)

On Android, we use RuntimeShader directly rather than a RuntimeEffect. This class wraps the SKSL to create RuntimeShader instances on demand.

Platform-specific runtime effect type for compiling shaders.

actual typealias PlatformRuntimeEffect = RuntimeEffect
typealias PlatformRuntimeEffect = RuntimeEffect

Platform-specific runtime effect type for compiling shaders.

Link copied to clipboard

Interface for setting uniforms on runtime shaders.

Functions

Link copied to clipboard

Converts this platform render effect to a Compose RenderEffect.

Converts this platform render effect to a Compose RenderEffect.

Converts this platform render effect to a Compose RenderEffect.

Link copied to clipboard
fun PlatformRenderEffect.blendForeground(foreground: PlatformRenderEffect, blendMode: HazeBlendMode, offset: Offset = Offset.Unspecified): PlatformRenderEffect

Blends this render effect with a foreground effect.

Link copied to clipboard
@RequiresApi(value = 29)
actual fun createBlendColorFilter(color: Int, blendMode: HazeBlendMode): PlatformColorFilter

Creates a color filter that blends with a given color.

Creates a color filter that blends with a given color.

Creates a color filter that blends with a given color.

Link copied to clipboard
@RequiresApi(value = 31)
actual fun createBlendRenderEffect(blendMode: HazeBlendMode, background: PlatformRenderEffect, foreground: PlatformRenderEffect, crop: Rect?): PlatformRenderEffect

Creates a blend PlatformRenderEffect from two render effects.

expect fun createBlendRenderEffect(blendMode: HazeBlendMode, background: PlatformRenderEffect, foreground: PlatformRenderEffect, crop: Rect? = null): PlatformRenderEffect

Creates a blend PlatformRenderEffect from two render effects.

Creates a blend PlatformRenderEffect from two render effects.

Link copied to clipboard
@RequiresApi(value = 31)
actual fun createBlurRenderEffect(radiusX: Float, radiusY: Float, tileMode: TileMode, input: PlatformRenderEffect?, crop: Rect?): PlatformRenderEffect?

Creates a blur PlatformRenderEffect.

expect fun createBlurRenderEffect(radiusX: Float, radiusY: Float, tileMode: TileMode, input: PlatformRenderEffect? = null, crop: Rect? = null): PlatformRenderEffect?

Creates a blur PlatformRenderEffect.

actual fun createBlurRenderEffect(radiusX: Float, radiusY: Float, tileMode: TileMode, input: PlatformRenderEffect?, crop: Rect?): PlatformRenderEffect?

Creates a blur PlatformRenderEffect.

Link copied to clipboard

Creates a color filter PlatformRenderEffect.

Creates a color filter PlatformRenderEffect.

Link copied to clipboard
@RequiresApi(value = 33)
actual fun createFractalNoiseShader(baseFrequencyX: Float, baseFrequencyY: Float, numOctaves: Int, seed: Float): Shader

Creates a fractal noise shader.

expect fun createFractalNoiseShader(baseFrequencyX: Float, baseFrequencyY: Float, numOctaves: Int, seed: Float): Shader

Creates a fractal noise shader.

actual fun createFractalNoiseShader(baseFrequencyX: Float, baseFrequencyY: Float, numOctaves: Int, seed: Float): Shader

Creates a fractal noise shader.

Link copied to clipboard
@RequiresApi(value = 31)
actual fun createOffsetRenderEffect(offsetX: Float, offsetY: Float, input: PlatformRenderEffect?, crop: Rect?): PlatformRenderEffect

Creates an offset PlatformRenderEffect.

expect fun createOffsetRenderEffect(offsetX: Float, offsetY: Float, input: PlatformRenderEffect? = null, crop: Rect? = null): PlatformRenderEffect

Creates an offset PlatformRenderEffect.

actual fun createOffsetRenderEffect(offsetX: Float, offsetY: Float, input: PlatformRenderEffect?, crop: Rect?): PlatformRenderEffect

Creates an offset PlatformRenderEffect.

Link copied to clipboard

Creates a PlatformRuntimeEffect from SKSL shader code.

Creates a PlatformRuntimeEffect from SKSL shader code.

Creates a PlatformRuntimeEffect from SKSL shader code.

Link copied to clipboard

Creates a runtime shader PlatformRenderEffect with the given effect and child shaders.

Creates a runtime shader PlatformRenderEffect with the given effect and child shaders.

Creates a runtime shader PlatformRenderEffect with the given effect and child shaders.

Link copied to clipboard
@RequiresApi(value = 31)
actual fun createShaderRenderEffect(shader: Shader, crop: Rect?): PlatformRenderEffect

Creates a PlatformRenderEffect from a shader.

expect fun createShaderRenderEffect(shader: Shader, crop: Rect? = null): PlatformRenderEffect

Creates a PlatformRenderEffect from a shader.

Creates a PlatformRenderEffect from a shader.

Link copied to clipboard

Chains this render effect with another, composing them.

Chains this render effect with another, composing them.

Chains this render effect with another, composing them.

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

Converts a Compose ColorFilter to an Android platform PlatformColorFilter.

Converts a Compose ColorFilter to a Skia platform PlatformColorFilter.

Link copied to clipboard

Converts a HazeBlendMode to Skia's BlendMode.

Link copied to clipboard
actual inline fun <R> trace(sectionName: String, block: () -> R): R
expect inline fun <R> trace(sectionName: String, block: () -> R): R
actual inline fun <R> trace(sectionName: String, block: () -> R): R
Link copied to clipboard
actual inline suspend fun <R> traceAsync(sectionName: String, cookie: Int, crossinline block: suspend () -> R): R
expect inline suspend fun <R> traceAsync(sectionName: String, cookie: Int, crossinline block: suspend () -> R): R
actual inline suspend fun <R> traceAsync(sectionName: String, cookie: Int, crossinline block: suspend () -> R): R