AnimalCrossingQR.QRDialog.CreateOutputImage C# (CSharp) Method

CreateOutputImage() private method

private CreateOutputImage ( ) : Image
return Image
        private Image CreateOutputImage()
        {
            Image outputImage = new Bitmap(400, 240);
            using (Graphics graphics = Graphics.FromImage(outputImage))
            {
                graphics.Clear(Color.White);

                StringFormat sf = new StringFormat();
                sf.LineAlignment = StringAlignment.Center;
                sf.Alignment = StringAlignment.Center;
                Font font = new System.Drawing.Font("Arial", 18, FontStyle.Regular);
                graphics.DrawString(pattern.Title, font, Brushes.Black, 195, 18, sf);

                graphics.DrawImage(CreateQRCode(pattern, 2), new Point(187, 35));

                graphics.DrawImage(RenderPattern(pattern, 4), 37, 69);
            }

            return outputImage;
        }