Exemple #1
0
        public static Bitmap GetImage(int width, int height)
        {
            sizeBlocks = width / 7;
            int           amountImages = 56;
            List <Bitmap> bitmaps      = DrawImages.CreateBitmapBlocks(amountImages, false);
            Paint         p            = new Paint();

            p.StrokeWidth = 0.5f;
            p.SetStyle(Paint.Style.Fill);
            p.Color = Color.White;
            Bitmap b = Bitmap.CreateBitmap(width, height, Bitmap.Config.Argb8888);
            Canvas c = new Canvas(b);

            //Make background White
            c.DrawRect(new Rect(0, 0, width, height), p);
            //Draw Blocks
            for (int i = 0; i < amountImages; i++)
            {
                c.DrawBitmap(bitmaps[i], (i % 7) * (width / 7), (i % 8) * (height / 8), p);
            }
            p.Dispose();
            c.Dispose();
            return(b);
        }