Skip to main content

Class SKShader

Namespace: SkiaSharp
Assembly: VelloSharp.Skia.Core.dll

public sealed class SKShader : IDisposable

Inheritance

objectSKShader

Implements

IDisposable

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Methods

CreateColor(SKColor)

public static SKShader CreateColor(SKColor color)

Parameters

color SKColor

Returns

SKShader

CreateCompose(SKShader, SKShader)

public static SKShader CreateCompose(SKShader outer, SKShader inner)

Parameters

outer SKShader

inner SKShader

Returns

SKShader

CreateLinearGradient(SKPoint, SKPoint, SKColor[], float[]?, SKShaderTileMode, SKMatrix?)

public static SKShader CreateLinearGradient(SKPoint start, SKPoint end, SKColor[] colors, float[]? colorPos, SKShaderTileMode tileMode, SKMatrix? localMatrix = null)

Parameters

start SKPoint

end SKPoint

colors SKColor[]

colorPos float[]?

tileMode SKShaderTileMode

localMatrix SKMatrix?

Returns

SKShader

CreateLinearGradient(SKPoint, SKPoint, SKColor[], float[]?, SKShaderTileMode)

public static SKShader CreateLinearGradient(SKPoint start, SKPoint end, SKColor[] colors, float[]? colorPos, SKShaderTileMode tileMode)

Parameters

start SKPoint

end SKPoint

colors SKColor[]

colorPos float[]?

tileMode SKShaderTileMode

Returns

SKShader

CreateRadialGradient(SKPoint, float, SKColor[], float[]?, SKShaderTileMode, SKMatrix?)

public static SKShader CreateRadialGradient(SKPoint center, float radius, SKColor[] colors, float[]? colorPos, SKShaderTileMode tileMode, SKMatrix? localMatrix = null)

Parameters

center SKPoint

radius float

colors SKColor[]

colorPos float[]?

tileMode SKShaderTileMode

localMatrix SKMatrix?

Returns

SKShader

CreateRadialGradient(SKPoint, float, SKColor[], float[]?, SKShaderTileMode)

public static SKShader CreateRadialGradient(SKPoint center, float radius, SKColor[] colors, float[]? colorPos, SKShaderTileMode tileMode)

Parameters

center SKPoint

radius float

colors SKColor[]

colorPos float[]?

tileMode SKShaderTileMode

Returns

SKShader

CreateSweepGradient(SKPoint, SKColor[], float[]?, SKMatrix?)

public static SKShader CreateSweepGradient(SKPoint center, SKColor[] colors, float[]? colorPos, SKMatrix? localMatrix = null)

Parameters

center SKPoint

colors SKColor[]

colorPos float[]?

localMatrix SKMatrix?

Returns

SKShader

CreateTwoPointConicalGradient(SKPoint, float, SKPoint, float, SKColor[], float[]?, SKShaderTileMode, SKMatrix?)

public static SKShader CreateTwoPointConicalGradient(SKPoint start, float startRadius, SKPoint end, float endRadius, SKColor[] colors, float[]? colorPos, SKShaderTileMode tileMode, SKMatrix? localMatrix = null)

Parameters

start SKPoint

startRadius float

end SKPoint

endRadius float

colors SKColor[]

colorPos float[]?

tileMode SKShaderTileMode

localMatrix SKMatrix?

Returns

SKShader

CreateTwoPointConicalGradient(SKPoint, float, SKPoint, float, SKColor[], float[]?, SKShaderTileMode)

public static SKShader CreateTwoPointConicalGradient(SKPoint start, float startRadius, SKPoint end, float endRadius, SKColor[] colors, float[]? colorPos, SKShaderTileMode tileMode)

Parameters

start SKPoint

startRadius float

end SKPoint

endRadius float

colors SKColor[]

colorPos float[]?

tileMode SKShaderTileMode

Returns

SKShader

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

WithColorFilter(SKColorFilter?)

public SKShader WithColorFilter(SKColorFilter? filter)

Parameters

filter SKColorFilter?

Returns

SKShader