Skip to content

Instantly share code, notes, and snippets.

@vshapenko
Created July 17, 2019 09:51
Show Gist options
  • Save vshapenko/dc97cee7f2ee03ed35a52198256ba20a to your computer and use it in GitHub Desktop.
Save vshapenko/dc97cee7f2ee03ed35a52198256ba20a to your computer and use it in GitHub Desktop.
let typeface=loadFont font
let lowerOrigin=new SKPoint(float32 (info.Width / 2),float32 (info.Height- info.Width / 2))
let upperOrigin=new SKPoint (float32 (info.Width / 2), float32 (info.Width/3))
let upperTextSize=float32 (info.Width/3)
let lowerTextSize=float32 (info.Width/2)
use textPaint = new SKPaint(Style = SKPaintStyle.Fill, Color = textColor.ToSKColor(), IsStroke=false,TextAlign=SKTextAlign.Center,TextSize=lowerTextSize,Typeface=typeface)
use unreadPaint = new SKPaint(Style = SKPaintStyle.Fill, Color = Color.Black.ToSKColor(), IsStroke=false,TextAlign=SKTextAlign.Center,TextSize=upperTextSize)
canvas.DrawCircle(lowerOrigin.X,lowerOrigin.Y,(float32 info.Width)/2.0f-1.0f, paint)
// canvas.DrawCircle(upperOrigin.X,upperOrigin.Y,float32(info.Width/3), wp)
canvas.DrawText(string txt,lowerOrigin.X,lowerOrigin.Y+lowerTextSize/2.0f ,textPaint)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment