SKShader.CreateRadialGradient Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| CreateRadialGradient(SKPoint, Single, SKColor[], SKShaderTileMode) |
Creates a shader that generates a radial gradient given the center and radius. |
| CreateRadialGradient(SKPoint, Single, SKColor[], Single[], SKShaderTileMode) |
Creates a shader that generates a radial gradient given the center and radius. |
| CreateRadialGradient(SKPoint, Single, SKColorF[], SKColorSpace, SKShaderTileMode) |
Creates a shader that generates a radial gradient in a specified color space. |
| CreateRadialGradient(SKPoint, Single, SKColor[], Single[], SKShaderTileMode, SKMatrix) |
Creates a shader that generates a radial gradient given the center and radius. |
| CreateRadialGradient(SKPoint, Single, SKColorF[], SKColorSpace, Single[], SKShaderTileMode) |
Creates a shader that generates a radial gradient in a specified color space. |
| CreateRadialGradient(SKPoint, Single, SKColorF[], SKColorSpace, Single[], SKShaderTileMode, SKMatrix) |
Creates a shader that generates a radial gradient in a specified color space. |
CreateRadialGradient(SKPoint, Single, SKColor[], SKShaderTileMode)
Creates a shader that generates a radial gradient given the center and radius.
public static SkiaSharp.SKShader CreateRadialGradient(SkiaSharp.SKPoint center, float radius, SkiaSharp.SKColor[] colors, SkiaSharp.SKShaderTileMode mode);
Parameters
- center
- SKPoint
The center of the circle for this gradient.
- radius
- Single
The positive radius of the circle for this gradient.
- colors
- SKColor[]
The array colors to be distributed between the center and edge of the circle.
- mode
- SKShaderTileMode
The tiling mode.
Returns
Returns a new SKShader, or an empty shader on error. Never returns null.
Applies to
CreateRadialGradient(SKPoint, Single, SKColor[], Single[], SKShaderTileMode)
Creates a shader that generates a radial gradient given the center and radius.
public static SkiaSharp.SKShader CreateRadialGradient(SkiaSharp.SKPoint center, float radius, SkiaSharp.SKColor[] colors, float[] colorPos, SkiaSharp.SKShaderTileMode mode);
Parameters
- center
- SKPoint
The center of the circle for this gradient.
- radius
- Single
The positive radius of the circle for this gradient.
- colors
- SKColor[]
The array colors to be distributed between the center and edge of the circle.
- colorPos
- Single[]
The positions (in the range of 0..1) of each corresponding color, or null to evenly distribute the colors.
- mode
- SKShaderTileMode
The tiling mode.
Returns
Returns a new SKShader, or an empty shader on error. Never returns null.
Applies to
CreateRadialGradient(SKPoint, Single, SKColorF[], SKColorSpace, SKShaderTileMode)
Creates a shader that generates a radial gradient in a specified color space.
public static SkiaSharp.SKShader CreateRadialGradient(SkiaSharp.SKPoint center, float radius, SkiaSharp.SKColorF[] colors, SkiaSharp.SKColorSpace colorspace, SkiaSharp.SKShaderTileMode mode);
Parameters
- center
- SKPoint
The center of the circle for this gradient.
- radius
- Single
The positive radius of the circle for this gradient.
- colors
- SKColorF[]
The array of colors to be distributed between the center and edge of the circle.
- colorspace
- SKColorSpace
The color space for the gradient colors.
- mode
- SKShaderTileMode
The tiling mode.
Returns
Returns a new SKShader, or an empty shader on error.
Applies to
CreateRadialGradient(SKPoint, Single, SKColor[], Single[], SKShaderTileMode, SKMatrix)
Creates a shader that generates a radial gradient given the center and radius.
public static SkiaSharp.SKShader CreateRadialGradient(SkiaSharp.SKPoint center, float radius, SkiaSharp.SKColor[] colors, float[] colorPos, SkiaSharp.SKShaderTileMode mode, SkiaSharp.SKMatrix localMatrix);
Parameters
- center
- SKPoint
The center of the circle for this gradient.
- radius
- Single
The positive radius of the circle for this gradient.
- colors
- SKColor[]
The array colors to be distributed between the center and edge of the circle.
- colorPos
- Single[]
The positions (in the range of 0..1) of each corresponding color, or null to evenly distribute the colors.
- mode
- SKShaderTileMode
The tiling mode.
- localMatrix
- SKMatrix
The matrix to apply before applying the shader.
Returns
Returns a new SKShader, or an empty shader on error. Never returns null.
Applies to
CreateRadialGradient(SKPoint, Single, SKColorF[], SKColorSpace, Single[], SKShaderTileMode)
Creates a shader that generates a radial gradient in a specified color space.
public static SkiaSharp.SKShader CreateRadialGradient(SkiaSharp.SKPoint center, float radius, SkiaSharp.SKColorF[] colors, SkiaSharp.SKColorSpace colorspace, float[] colorPos, SkiaSharp.SKShaderTileMode mode);
Parameters
- center
- SKPoint
The center of the circle for this gradient.
- radius
- Single
The positive radius of the circle for this gradient.
- colors
- SKColorF[]
The array of colors to be distributed between the center and edge of the circle.
- colorspace
- SKColorSpace
The color space for the gradient colors.
- colorPos
- Single[]
The positions (in the range of 0..1) of each corresponding color, or null to evenly distribute the colors.
- mode
- SKShaderTileMode
The tiling mode.
Returns
Returns a new SKShader, or an empty shader on error.
Applies to
CreateRadialGradient(SKPoint, Single, SKColorF[], SKColorSpace, Single[], SKShaderTileMode, SKMatrix)
Creates a shader that generates a radial gradient in a specified color space.
public static SkiaSharp.SKShader CreateRadialGradient(SkiaSharp.SKPoint center, float radius, SkiaSharp.SKColorF[] colors, SkiaSharp.SKColorSpace colorspace, float[] colorPos, SkiaSharp.SKShaderTileMode mode, SkiaSharp.SKMatrix localMatrix);
Parameters
- center
- SKPoint
The center of the circle for this gradient.
- radius
- Single
The positive radius of the circle for this gradient.
- colors
- SKColorF[]
The array of colors to be distributed between the center and edge of the circle.
- colorspace
- SKColorSpace
The color space for the gradient colors.
- colorPos
- Single[]
The positions (in the range of 0..1) of each corresponding color, or null to evenly distribute the colors.
- mode
- SKShaderTileMode
The tiling mode.
- localMatrix
- SKMatrix
The matrix to apply before applying the shader.
Returns
Returns a new SKShader, or an empty shader on error.