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
Description
When rendering radial gradients it seems that the library only renders the last color of that color stack.
Code
using System.Text;
using SkiaSharp;
var svgText = """
""";
var svgBytes = Encoding.UTF8.GetBytes(svgText);
using var svgStream = new MemoryStream(svgBytes);
var svg = new SkiaSharp.Extended.Svg.SKSvg(new SKSize(500, 500));
svg.Load(svgStream);
using var bitmap = new SKBitmap(500, 500);
using var canvas = new SKCanvas(bitmap);
canvas.DrawPicture(svg.Picture);
using var outputStream = new FileStream("test.png", FileMode.Create);
using var image = SKImage.FromBitmap(bitmap);
using var data = image.Encode(SKEncodedImageFormat.Png, 100);
data.SaveTo(outputStream);
Console.WriteLine("Done!");
Expected Behavior
A PNG that with the same Colors as the SVG
Actual Behavior
A PNG that is just blue
Basic Information
Version with issue: SkiaSharp 2.88.8, SkiaSharp.Svg 1.60.0
Last known good version: /
IDE: VS Professional and VS Code
Platform Target Frameworks:
Windows Classic: Windows 11 Pro
Detailed IDE/OS information (click to expand)
PASTE ANY DETAILED VERSION INFO HERE
Screenshots
SVG:
Generated PNG:
Reproduction Link
The text was updated successfully, but these errors were encountered:
Description
When rendering radial gradients it seems that the library only renders the last color of that color stack.
Code
using System.Text;
using SkiaSharp;
var svgText = """
""";
var svgBytes = Encoding.UTF8.GetBytes(svgText);
using var svgStream = new MemoryStream(svgBytes);
var svg = new SkiaSharp.Extended.Svg.SKSvg(new SKSize(500, 500));
svg.Load(svgStream);
using var bitmap = new SKBitmap(500, 500);
using var canvas = new SKCanvas(bitmap);
canvas.DrawPicture(svg.Picture);
using var outputStream = new FileStream("test.png", FileMode.Create);
using var image = SKImage.FromBitmap(bitmap);
using var data = image.Encode(SKEncodedImageFormat.Png, 100);
data.SaveTo(outputStream);
Console.WriteLine("Done!");
Expected Behavior
A PNG that with the same Colors as the SVG
Actual Behavior
A PNG that is just blue
Basic Information
Detailed IDE/OS information (click to expand)
Screenshots
SVG:
Generated PNG:
Reproduction Link
The text was updated successfully, but these errors were encountered: