SKShader.CreateBitmap 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
CreateBitmap(SKBitmap) |
Creates a new shader that will draw with the specified bitmap. |
CreateBitmap(SKBitmap, SKShaderTileMode, SKShaderTileMode) |
Creates a new shader that will draw with the specified bitmap. |
CreateBitmap(SKBitmap, SKShaderTileMode, SKShaderTileMode, SKMatrix) |
Creates a new shader that will draw with the specified bitmap. |
CreateBitmap(SKBitmap)
Creates a new shader that will draw with the specified bitmap.
public static SkiaSharp.SKShader CreateBitmap (SkiaSharp.SKBitmap src);
Parameters
- src
- SKBitmap
The bitmap to use inside the shader.
Returns
Returns a new SKShader, or an empty shader on error. This function never returns null.
Remarks
If the bitmap cannot be used (has no pixels, or its dimensions exceed implementation limits) then an empty shader may be returned. If the source bitmap's color type is Alpha8 then that mask will be colorized using the color on the paint.
Applies to
CreateBitmap(SKBitmap, SKShaderTileMode, SKShaderTileMode)
Creates a new shader that will draw with the specified bitmap.
public static SkiaSharp.SKShader CreateBitmap (SkiaSharp.SKBitmap src, SkiaSharp.SKShaderTileMode tmx, SkiaSharp.SKShaderTileMode tmy);
Parameters
- src
- SKBitmap
The bitmap to use inside the shader.
- tmx
- SKShaderTileMode
The tiling mode to use when sampling the bitmap in the x-direction.
- tmy
- SKShaderTileMode
The tiling mode to use when sampling the bitmap in the y-direction.
Returns
Returns a new SKShader, or an empty shader on error. This function never returns null.
Remarks
If the bitmap cannot be used (has no pixels, or its dimensions exceed implementation limits) then an empty shader may be returned. If the source bitmap's color type is Alpha8 then that mask will be colorized using the color on the paint.
Applies to
CreateBitmap(SKBitmap, SKShaderTileMode, SKShaderTileMode, SKMatrix)
Creates a new shader that will draw with the specified bitmap.
public static SkiaSharp.SKShader CreateBitmap (SkiaSharp.SKBitmap src, SkiaSharp.SKShaderTileMode tmx, SkiaSharp.SKShaderTileMode tmy, SkiaSharp.SKMatrix localMatrix);
Parameters
- src
- SKBitmap
The bitmap to use inside the shader.
- tmx
- SKShaderTileMode
The tiling mode to use when sampling the bitmap in the x-direction.
- tmy
- SKShaderTileMode
The tiling mode to use when sampling the bitmap in the y-direction.
- localMatrix
- SKMatrix
The matrix to apply before applying the shader.
Returns
Returns a new SKShader, or an empty shader on error. This function never returns null.
Remarks
If the bitmap cannot be used (has no pixels, or its dimensions exceed implementation limits) then an empty shader may be returned. If the source bitmap's color type is Alpha8 then that mask will be colorized using the color on the paint.
Applies to
SkiaSharp
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기