ShaderArgument
A single uniform argument value to a shader function.
Declaration
type ShaderArgument =
| 'boundingRect'
| { color: Color; }
| { colorArray: Color[]; }
| { float: number; }
| { float2: { x: number; y: number; }; }
| { float2: CGPoint; }
| { float2: CGSize; }
| { float2: CGVector; }
| { float3: { x: number; y: number; z: number; }; }
| { float4: { x: number; y: number; z: number; w: number; }; }
| { floatArray: number[]; }
| { image: Image; };struct ArgumentPass a literal, or build one with SwiftUI.ShaderArgument from import { SwiftUI } from 'swiftui-react-native'.
Type properties
'boundingRect'SwiftUI.ShaderArgument.boundingRectReturns an argument value representing the bounding rect of the shape or view that the shader is attached to, as
float4(x, y, width, height). This value is undefined for shaders that do not have a natural bounding rect (e.g. filter effects drawn intoGraphicsContext).
Type methods
See also
More in Drawing and shapes.
- AngleA geometric angle whose value you access in either radians or degrees.
- AngularGradientAn angular gradient.
- AnyGradientA color gradient.
- BlendModeModes for compositing a view with overlapping content.
- ButtonBorderShapeA shape used to draw a button's border.
- ColorMatrixA matrix to use in an RGBA color transformation.
- ConcentricRectangleAnimatableDataThe type defining the data to animate.
- ContainerRelativeShapeA shape that is replaced by an inset version of the current container shape. If no container shape was defined, is replaced by a rectangle.
- ContentShapeKindsA kind for the content shape of a view.
- CoordinateSpaceProtocolA frame of reference within the layout system.
- DefaultGlassEffectShapeThe default shape applied by glass effects, a capsule.
- EllipticalGradientA radial gradient that draws an ellipse.