所有图形对象的输出相同

时间:2015-01-13 10:25:30

标签: c# graphics bitmap printdocument

我的数据有几个输出,想要为任何输出可能创建一个fill-Object。例如PrintDocument和Bitmap。这适用于Graphics-Object,但结果不同。

我的填充图形测试方法:

    protected void fillGraphics(Graphics g)
    {
        g.PageUnit = GraphicsUnit.Pixel;
        Pen pen = new Pen(Brushes.Black, 3);
        g.DrawRectangle(pen, 100, 100, 300, 300);
        g.DrawString("Wichtig!", new System.Drawing.Font(FontFamily.GenericSansSerif, 16), new SolidBrush(Color.Black), 120, 120);
    }

enter image description here

0 个答案:

没有答案