c# 打印panel控件模糊。主要代码如下:
//打印每页的panelpublicvoidSettingReportPage(Controlcon,Graphicsg,inty){Bitmapbp=newBitmap...
//打印每页的panel
public void SettingReportPage(Control con, Graphics g, int y)
{
Bitmap bp = new Bitmap(con.Width, con.Height );
bp.SetResolution(3000, 3000); //分辨率
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.SmoothingMode = SmoothingMode.HighQuality;
g.PixelOffsetMode = PixelOffsetMode.Half;
g.CompositingQuality = CompositingQuality.HighQuality;
g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
Rectangle rect1;
rect1 = new Rectangle(0, 0, bp.Width, bp.Height);
con.DrawToBitmap(bp, rect1);
g.DrawImage(bp, (int)con.Location.X+9, y, bp.Width, bp.Height);
}
打印drawstring非常清晰,然而打印drawimage不清晰。 展开
public void SettingReportPage(Control con, Graphics g, int y)
{
Bitmap bp = new Bitmap(con.Width, con.Height );
bp.SetResolution(3000, 3000); //分辨率
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.SmoothingMode = SmoothingMode.HighQuality;
g.PixelOffsetMode = PixelOffsetMode.Half;
g.CompositingQuality = CompositingQuality.HighQuality;
g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
Rectangle rect1;
rect1 = new Rectangle(0, 0, bp.Width, bp.Height);
con.DrawToBitmap(bp, rect1);
g.DrawImage(bp, (int)con.Location.X+9, y, bp.Width, bp.Height);
}
打印drawstring非常清晰,然而打印drawimage不清晰。 展开
若以下回答无法解决问题,邀请你更新回答
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询