I want to create custom pins using SkiaSharp where I have a PinIcon.png which is simply a circle icon that's filled in with colour. I want to have numbers starting from 1 inside the pins, then add these numbered icons to the pins, and I figured that SkiaSharp was the best option. I cannot seem to draw on images using SkiaSharp, even though there is a lot of documentation.
I was thinking of something like below:
for( i = 1, i < pinlist.count, i++)
{
// numberedPin = PinIcon.Draw(i.ToString())
}
Create a new SKCanvas
with the circle image .
Use canvas.DrawText
to draw text on image .
Please check https://gist.github.com/xoofx/a9d08a37c43f692e65df80a1888c488b .
Answers
Create a new
SKCanvas
with the circle image .Use
canvas.DrawText
to draw text on image .Please check https://gist.github.com/xoofx/a9d08a37c43f692e65df80a1888c488b .
Thank you @ColeX
However, I went with Google's Dynamic Icons API: https://developers.google.com/chart/image/docs/gallery/dynamic_icons#pins