How to generate shadow under words on an image

hermitwolves

New Member
\[code\]public static System.Drawing.Image GenerateGiftCard(String text, Font font, Color textColor){ System.Drawing.Image img = Bitmap.FromFile(@"G:\xxx\images\gift-card.jpg"); Graphics drawing = Graphics.FromImage(img); //measure the string to see how big the image needs to be SizeF textSize = drawing.MeasureString(text, font); //create a brush for the text Brush textBrush = new SolidBrush(textColor); float x, y; x = img.Width / 2 - textSize.Width / 2; y = img.Height / 2 - textSize.Height / 2; drawing.DrawString(text, font, textBrush, x, y); drawing.Save(); textBrush.Dispose(); drawing.Dispose(); return img;}\[/code\]But the text generated by this code is "plain" not dimensional and no shadow beneath it.This is the font style I want:
5rzeP.jpg
Is there anything I can do to generate the same style via my code?
 
Back
Top