Go Back  Xtreme Visual Basic Talk > Visual Basic .NET (2002/2003/2005/2008, including Express editions) > .NET General > drawstring antialiasing


Reply
 
Thread Tools Display Modes
  #1  
Old 11-08-2006, 06:55 PM
inighthawki's Avatar
inighthawki inighthawki is offline
Contributor
 
Join Date: Jun 2005
Posts: 588
Default drawstring antialiasing


im designing a simple auto-run type app with some buttons, and to minimize the code used to select the buttons, i draw in the strings on seperate controls (larger buttons) and for a simple version, it works fine. The problem however is that im making more of an editor for it so u can type in names of buttons, title, etc and itll autocreate an ini config file for it to load data from. In this, i load the buttons without textboxes so the user can type his/her message in, but the textboxes have more antialiased or smoother text, and it doesnt look exactly as the final product will look. Any way to change the smoothness on the e.graphics.drawstring("") text?

thx in advance
__________________
Example is good. It is up to you, however, to take advantage of that example, and learn from it.
Reply With Quote
  #2  
Old 11-09-2006, 06:34 AM
Aquila's Avatar
Aquila Aquila is offline
Contributor
 
Join Date: Oct 2002
Location: Ocala, Fl.
Posts: 597
Default

look at the E.Graphics.SmoothingMode
__________________
Plotting to take over the world since 1978
Reply With Quote
  #3  
Old 11-09-2006, 01:13 PM
inighthawki's Avatar
inighthawki inighthawki is offline
Contributor
 
Join Date: Jun 2005
Posts: 588
Default

i tried changing the option of anti-alias, but maybe thats not exactly what i need, if u look at the images posted, even with AA on the text, it looks uncomparable to the text that was typed... The typed text simply looks much smoother. Any ideas how to fix this?

From left to right:
DrawString with AA on
DrawString with AA off
Typed String in Textbox on whatever it's default value is
Attached Images
File Type: jpg DrawStringAntiAlias.jpg (5.7 KB, 11 views)
File Type: jpg DrawStringDefault.jpg (5.8 KB, 11 views)
File Type: jpg TypedStringDefault.jpg (5.8 KB, 10 views)
__________________
Example is good. It is up to you, however, to take advantage of that example, and learn from it.
Reply With Quote
  #4  
Old 11-09-2006, 01:21 PM
shaul_ahuva shaul_ahuva is offline
Ultimate Contributor

Retired Leader
* Expert *
 
Join Date: Jul 2003
Location: Camp Hill, PA
Posts: 1,992
Default

SmoothingMode is only used for shapes and other non-text drawing. TextRenderingHint is used for text.
Reply With Quote
  #5  
Old 11-09-2006, 01:35 PM
inighthawki's Avatar
inighthawki inighthawki is offline
Contributor
 
Join Date: Jun 2005
Posts: 588
Default

thx, thats what i was looking for, text looks identical now :P
__________________
Example is good. It is up to you, however, to take advantage of that example, and learn from it.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->