Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# GDI+ graphics WinForm
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 18: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 OriginalGriff 645
1 Maciej Los 225
2 Abhinav S 171
3 Richard Deeming 160
4 Suvendu Shekhar Giri 159
0 Sergey Alexandrovich Kryukov 9,623
1 OriginalGriff 9,095
2 Peter Leow 5,044
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 2,581

Advertise | Privacy | Mobile
Web03 | 2.8.150327.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