Ejemplo n.º 1
0
        private void OverlayName()
        {
            Image orig = textureData[0].Panel.BackgroundImage;

            Bitmap name    = new Bitmap(textureData[1].Texture.GetImage(0));
            Bitmap swapped = BitmapUtilities.AlphaSwap(name);
            Bitmap blurred = BitmapUtilities.BlurCombine(swapped, Color.Black);

            Bitmap   overlaid = new Bitmap(orig.Width, orig.Height);
            Graphics g        = Graphics.FromImage(overlaid);

            g.DrawImage(orig,
                        new Rectangle(0, 0, 128, 160),
                        new Rectangle(0, 0, 128, 160),
                        GraphicsUnit.Pixel);
            g.DrawImage(blurred, new Point[] {
                new Point(0, 84),
                new Point(131, 84),
                new Point(-3, 127)
            });
            textureData[0].Panel.BackgroundImage = overlaid;
        }