Enumerationmigueldeicaza.swiftgodot 0.46.0SwiftGodot
InterpolationMode
Gradient.swift:22enum InterpolationMode
Cases
case linear
Linear interpolation.
case constant
Constant interpolation, color changes abruptly at each point and stays uniform between. This might cause visible aliasing when used for a gradient texture in some cases.
case cubic
Cubic interpolation.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (15) members.
Types
Type members
Instance members
var colors: PackedColorArray
Gradient’s colors as a
PackedColorArray
.var interpolationColorSpace: Gradient.ColorSpace
The color space used to interpolate between points of the gradient. It does not affect the returned colors, which will always be in sRGB space. See
ColorSpace
for available modes.var interpolationMode: Gradient.InterpolationMode
The algorithm used to interpolate between points of the gradient. See
InterpolationMode
for available modes.var offsets: PackedFloat32Array
Gradient’s offsets as a
PackedFloat32Array
.func addPoint(offset: Double, color: Color
) Adds the specified color to the gradient, with the specified offset.
func getColor(point: Int32
) -> Color Returns the color of the gradient color at index
point
.func getOffset(point: Int32
) -> Double Returns the offset of the gradient color at index
point
.func getPointCount(
) -> Int32 Returns the number of colors in the gradient.
func removePoint(Int32
) Removes the color at index
point
.func reverse(
) Reverses/mirrors the gradient.
func sample(offset: Double
) -> Color Returns the interpolated color specified by
offset
.func setColor(point: Int32, color: Color
) Sets the color of the gradient color at index
point
.func setOffset(point: Int32, offset: Double
) Sets the offset for the gradient color at index
point
.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.