You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The radial gradient shader is not applied when drawing on SKSvgCanvas, but the linear gradient works without issues. There is no error at all, the radial gradient shader is treated as if it wasn't defined at all.
usingSkiaSharp;constfloatsize=1000;LinearGradient();RadialGradient();voidLinearGradient(){usingvarfileStream=newFileStream("linear_gradient.svg",FileMode.Create);usingvarcanvas=SKSvgCanvas.Create(newSKRect(0f,0f,size,size),fileStream);usingvarpaint=newSKPaint{Shader=SKShader.CreateLinearGradient(newSKPoint(0,0),newSKPoint(size,size),[SKColors.CornflowerBlue,SKColors.YellowGreen],null,SKShaderTileMode.Clamp)};canvas.DrawPaint(paint);canvas.Flush();}// Does not workvoidRadialGradient(){usingvarfileStream=newFileStream("radial_gradient.svg",FileMode.Create);usingvarcanvas=SKSvgCanvas.Create(newSKRect(0f,0f,size,size),fileStream);usingvarpaint=newSKPaint{Shader=SKShader.CreateRadialGradient(newSKPoint(size/2,size/2),size/2,[SKColors.CornflowerBlue,SKColors.YellowGreen],null,SKShaderTileMode.Clamp)};canvas.DrawPaint(paint);canvas.Flush();}
Expected Behavior
No response
Actual Behavior
No response
Version of SkiaSharp
2.88.9 (Current)
Last Known Good Version of SkiaSharp
No idea
IDE / Editor
Other (Please indicate in the description)
Platform / Operating System
Linux
Platform / Operating System Version
No response
Devices
No response
Relevant Screenshots
Linear gradient output:
Radial gradient output:
Relevant Log Output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Thank you, it looks like there is no Issues or Discussions tab on that project where this could be pointed out.
It's up to their needs whether this will ever be implemented.
Thank you, it looks like there is no Issues or Discussions tab on that project where this could be pointed out. It's up to their needs whether this will ever be implemented.
Description
Hello,
The radial gradient shader is not applied when drawing on
SKSvgCanvas
, but the linear gradient works without issues. There is no error at all, the radial gradient shader is treated as if it wasn't defined at all.Code
Sample repo: https://github.com/nandor23/skiasharp-gradient-sample
The code as well:
Expected Behavior
No response
Actual Behavior
No response
Version of SkiaSharp
2.88.9 (Current)
Last Known Good Version of SkiaSharp
No idea
IDE / Editor
Other (Please indicate in the description)
Platform / Operating System
Linux
Platform / Operating System Version
No response
Devices
No response
Relevant Screenshots
Linear gradient output:
Radial gradient output:
Relevant Log Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: