Is there a option to fill a drawn polygon with an image/bitmap like image brushes on WPF?
Ok, I found this myself. You have to use SKShader for this and assign this shader to SKPaint.Shader.
Now I want to do the same with PathEffects. But I get strange outputs:
I use the following code:
paint.Style = SKPaintStyle.Stroke;
paint.Color = fillColor.ToSkia(opacity);
float scale = 10.0f;
SKPath fillPath = new SKPath();
matrix = SKMatrix.MakeScale(scale, scale);
paint.PathEffect = SKPathEffect.Create2DPath(matrix, fillPath);
If I don't clip the path, I get the following result:
Thank you for your help.
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies