示例#1
0
        public static Bitmap ToBitmap(this AView view)
        {
            var bitmap = Bitmap.CreateBitmap(view.Width, view.Height, Bitmap.Config.Argb8888);
            var canvas = new Canvas(bitmap);

            canvas.Save();
            canvas.Translate(0, 0);
            view.Draw(canvas);
            canvas.Restore();

            return(bitmap);
        }