Microsoft.Maui.Graphics
Microsoft.Maui.Graphics copied to clipboard
Transparency doesn't work in iOS FillRectangle()
I noticed that filling a rectangle in iOS doen't set the background to transparent. It works fine on WinUI and Android. Here is the code. On iOS, it always yields White background. I tried FillPaint as well, but same issue.
private void DrawBackground(ICanvas canvas, RectF dirtyRect)
{
canvas.SaveState();
canvas.FillColor = Colors.Transparent; ////TODO: Bug Fix in iOS - Transparency doesn't work
canvas.FillRectangle(dirtyRect);
canvas.RestoreState();
}
Has anyone found a workaround? I'm running into the same problem, even if I don't draw the rectangle. On Android the canvas is transparent by default, on iOS it's white.