Quote:
Originally Posted by searchbliss
I can create images with text on the fly with .NET, but I can't add text effects (reflections. shadows. etc.). Any ideas how to do this? Here are the namespaces I am using.
Code:
<%@ Page Language="VB" Debug="True" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Drawing.Imaging" %>
<%@ Import Namespace="System.Drawing.Text" %>
Thanks!
|
Your namespaces are correct. I haven't done text effects, but for the general part of creating the image and drawing text to it the following works to draw text in a rectangle (sorry, not a complete answer, but it might be of some help):
Bitmap bitmap = new Bitmap(100, 50);
Graphics gr = Graphics.FromImage(bitmap);
gr.FillRectangle(Brushes.LightGray, new Rectangle(0, 0, bitmap.Width, bitmap.Height));
gr.DrawString("Hello", font, Brushes.Black, (float)10, (float)20);
Dan