我有一个创建返回 a 的类Graphics
。我想以我的主要形式打印此图形。HoweverSystem.Drawing.Printing.PrintPageEventArg.Graphics
是只读的。Graphics
如何在无法设置的情况下打印我的System.Drawing.Printing.PrintPageEventArg.Graphics
public Graphics makeLabel()
{
Graphics label = Graphics.FromImage(makeBitMap());
label.PageUnit = GraphicsUnit.Inch;
label.DrawImage(Barcode,1, 200);
label.DrawString("Do Not Seperate", makeFont(), Brushes.Black, 100, 2);
label.DrawString("Choking Hazard", makeFont(), Brushes.Black, 200, 2);
return label;
}