Skip to content

Instantly share code, notes, and snippets.

@SteveDunn

SteveDunn/a.cs Secret

Created January 11, 2018 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SteveDunn/5247b41cad036cb05885d5a3df0f5f49 to your computer and use it in GitHub Desktop.
Save SteveDunn/5247b41cad036cb05885d5a3df0f5f49 to your computer and use it in GitHub Desktop.
void onCanvasDraw(ICanvasAnimatedControl sender, CanvasAnimatedDrawEventArgs args)
{
args.DrawingSession.Clear(Colors.Aquamarine);
using (var offscreenSession = _offscreenCanvas.CreateDrawingSession())
{
offscreenSession.Transform = _scale;
offscreenSession.Clear(Colors.Aquamarine);
offscreenSession.DrawText(Text, 0, 0, Colors.Red, _ctf);
offscreenSession.DrawLine(new Vector2(0,0), new Vector2(100,10), Colors.Black);
}
args.DrawingSession.DrawImage(_offscreenCanvas, 0,0);
args.DrawingSession.Transform = _scale;
args.DrawingSession.DrawText(Text, 0, 20, Colors.Red, _ctf);
args.DrawingSession.DrawLine(new Vector2(0, 20), new Vector2(100, 30), Colors.Black);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment