public Picture Snapshot(Rect bounds) { var skPictureRecorder = new PictureRecorder(); var skCanvas = skPictureRecorder.BeginRecording(bounds); OnDraw(skCanvas); return(skPictureRecorder.EndRecording()); }
public override void EndPage() { var picture = PictureRecorder?.EndRecording(); if (picture != null && CurrentPageSize.HasValue) { Pictures.Add(new PreviewerPicture(picture, CurrentPageSize.Value)); } PictureRecorder?.Dispose(); PictureRecorder = null; }