Drawing text right

tesseract

Member
Joined
Jul 3, 2008
Messages
13
Programming Experience
3-5
im making a desktop app and the background is clear, i set the background color and transparencykey to the same color. Now i need to draw text on the forum and this is how i am doing it
VB.NET:
e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
        Dim gp As New GraphicsPath
        Dim sb As New SolidBrush(Color.Black)

        gp.AddString("Hello world", New FontFamily("Calibri"), FontStyle.Regular, 22, New PointF(10, 200), StringFormat.GenericDefault)

        e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality
        e.Graphics.FillPath(sb, gp)

But the text still trys to blend with my background color making to look blocky and of poor quality... Does anyone have a solution to produce clear readable text?
 
I would say that it's because you've set the SmoothingMode to HighQuality. That is EXPLICITLY telling the text to blend with the background colour. Your form is the colour it is, whether the OS is displaying it or not, so any anti-aliasing will be done with that colour.
 
Back
Top