|
-
March 5th, 2012, 02:03 AM
#1
[RESOLVED] Drawn Text looks pixelated!
hi there,
the following code draws a text on the picture box, but it looks pixelated and seems bold, no matter what font-face and font-size i use and no matter i use FontStyle.Regular or not...
on the other hand, if i use any other color than black, the text will have a pixelated black outline as well!
Code:
System.Drawing.Font ft = new System.Drawing.Font("Verdana", 8.25f);
br = System.Drawing.Brushes.Black;
Bitmap bm = new Bitmap(picturebox1.Width, picturebox1.Height);
Graphics g = Graphics.FromImage(bm);
g.DrawString("My String", ft, br, 10, 10);
picturebox1.Image = bm;
ft.Dispose();
g.Dispose();
NOTE: since i'm drawing something else on the picture box, i'm using BITMAP to prevent the drawing to be cleared as soon as the control is refreshed...
Last edited by sean.aulason; March 5th, 2012 at 02:06 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|