开发者

How to render html to image format

I want to render "Hello dalvir" to image format so that hello dalvir shows in开发者_Python百科 red color in image. How i can do it in C#.


here is code...

Font MyFont = new Font(FontFamily, Font,FontStyle.Bold, GraphicsUnit.Point);
MyGraphics = Graphics.FromImage(bmpImage);
MyGraphics.Clear(Color.FromName("Red"));
MyGraphics.TextRenderingHint = TextRenderingHint.AntiAlias;
MyGraphics.DrawString("Hello dalvir", MyFont,
                    new SolidBrush(Color.FromName("Red")), 0, 0);
MyGraphics.Flush();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜