BaconBuilder.View.MainWindow.PrintCodeImageText C# (CSharp) Метод

PrintCodeImageText() приватный Метод

private PrintCodeImageText ( System.Drawing.Printing.PrintPageEventArgs e, string text, float &imageTop, float &imageBottom, int margin, float &height ) : void
e System.Drawing.Printing.PrintPageEventArgs
text string
imageTop float
imageBottom float
margin int
height float
Результат void
        private void PrintCodeImageText(PrintPageEventArgs e, string text, ref float imageTop, out float imageBottom, int margin, out float height)
        {
            Image code = QrCodeGenerator.GenerateCode(text);

            float qrTextX = e.MarginBounds.Left + code.Width + (e.MarginBounds.Left/2);

            height = code.Height;

            e.Graphics.DrawString(text, font, fontColor, new RectangleF(qrTextX, (imageTop + 90), e.MarginBounds.Width - code.Width, code.Height));

            e.Graphics.DrawImage(code, e.MarginBounds.Left, imageTop);

            imageBottom = imageTop + code.Height;
            imageTop = imageBottom + margin;
        }