Click here to Skip to main content
11,811,971 members (54,513 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# GDI+ graphics
The method DrawString() gives out a very nice result, the text/string is drawn clearly as you type it into a textbox. However I tried another way (a by-way) but it showed a bad appearance. I need to do this way because I want to apply some transformations to the string first (such as rotating). The way I did is creating a GraphicsPath, using AddString() method to add some string to that GraphicsPath, then using DrawPath() to draw that string. The drawn string looked very ugly (I didn't specify a bold font but it seemed to be affected by bold style, the string was like as blurred, ... it was really not what I want.

Do you know any options to change for this to work better (like DrawString() can do)?

Thank you!

Posted 17-Mar-13 17:56pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You don't really need to represent a string as a graphic path for proper transform. Transformations are done using System.Drawing.Graphics.Transform:[^],[^].

supernorb at 18-Mar-13 4:52am
Thank you, I have known of this before but really don't know why I could overlook it. Thanks.
Sergey Alexandrovich Kryukov at 18-Mar-13 10:09am
You are welcome,

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 KrunalRohit 354
1 Palash Mondal_ 185
2 CHill60 180
3 OriginalGriff 178
4 Abhinav S 175
0 OriginalGriff 3,888
1 KrunalRohit 2,392
2 CPallini 2,240
3 Maciej Los 2,155
4 ppolymorphe 1,725

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 18 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100