protected Bitmap SetImageNumber(Bitmap targetImage, string targetString)
        {
            Bitmap bmpImage 
= targetImage;
            RectangleF rectTitle 
= new RectangleF(11605656);
            Font displayFont 
= new Font("Tahoma"9, FontStyle.Regular);
            SolidBrush brush 
= new SolidBrush(Color.White);
            StringFormat strFormat 
= new StringFormat();
            strFormat.Alignment 
= StringAlignment.Center;
            strFormat.LineAlignment 
= StringAlignment.Center;

            
if (null == targetImage)
            {
                
return null;
            }
            
using(Graphics g = Graphics.FromImage(bmpImage))
            {
                g.DrawString(targetString, displayFont, brush, rectTitle, strFormat);
            }

            brush.Dispose();

            
return bmpImage;
        }

 

相关文章:

  • 2022-12-23
  • 2021-07-17
  • 2022-12-23
  • 2021-11-20
  • 2021-04-01
  • 2022-12-23
  • 2022-01-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
  • 2022-12-23
  • 2021-09-09
  • 2021-07-12
  • 2022-12-23
相关资源
相似解决方案