Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
Structure

Shader

The Compose SwiftUI form of SwiftUI's Shader.

iOS 17.0+macOS 14.0+tvOS 17.0+watchOS: unavailable (no-op)
class Shader

Overview

This is the Kotlin form of SwiftUI Shader: SwiftUI documentation. In Swift it reads:

struct Shader

Topics

Initializers

constructor(function: ShaderFunction, arguments: List<Shader.Argument>)
SwiftUI Shader.init(function:arguments:)

Type properties

val boundingRect: Shader.Argument
SwiftUI Shader.Argument.boundingRect
val shapeStyle: Shader.UsageType
SwiftUI Shader.UsageType.shapeStyle · iOS 18.0+, macOS 15.0+, tvOS 18.0+, watchOS: unavailable (no-op)
val colorEffect: Shader.UsageType
SwiftUI Shader.UsageType.colorEffect · iOS 18.0+, macOS 15.0+, tvOS 18.0+, watchOS: unavailable (no-op)
val layerEffect: Shader.UsageType
SwiftUI Shader.UsageType.layerEffect · iOS 18.0+, macOS 15.0+, tvOS 18.0+, watchOS: unavailable (no-op)
val distortionEffect: Shader.UsageType
SwiftUI Shader.UsageType.distortionEffect · iOS 18.0+, macOS 15.0+, tvOS 18.0+, watchOS: unavailable (no-op)

Methods

fun colorArray(array: List<Color>): Shader.Argument
SwiftUI Shader.Argument.colorArray(_:)
fun color(color: Color): Shader.Argument
SwiftUI Shader.Argument.color(_:)
fun float(x: Double): Shader.Argument
SwiftUI Shader.Argument.float(_:)
fun float2(size: CGSize): Shader.Argument
SwiftUI Shader.Argument.float2(_:)
fun float2(point: CGPoint): Shader.Argument
SwiftUI Shader.Argument.float2(_:)
fun float2(vector: CGVector): Shader.Argument
SwiftUI Shader.Argument.float2(_:)
fun float2(x: Double, y: Double): Shader.Argument
SwiftUI Shader.Argument.float2(_:_:)
fun float3(x: Double, y: Double, z: Double): Shader.Argument
SwiftUI Shader.Argument.float3(_:_:_:)
fun float4(x: Double, y: Double, z: Double, w: Double): Shader.Argument
SwiftUI Shader.Argument.float4(_:_:_:_:)

Types

class Shader
SwiftUI Shader
class Argument
SwiftUI Shader.Argument
class UsageType
SwiftUI Shader.UsageType · iOS 18.0+, macOS 15.0+, tvOS 18.0+, watchOS: unavailable (no-op)