protected
Bitmap SetImageNumber(Bitmap targetImage,
string
targetString)
{
Bitmap bmpImage = targetImage;
RectangleF rectTitle = new RectangleF( 116 , 0 , 56 , 56 );
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;
}
{
Bitmap bmpImage = targetImage;
RectangleF rectTitle = new RectangleF( 116 , 0 , 56 , 56 );
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;
}