6. Drawing Text
Probably the most useful thing to draw in any application is text. Sometimes, you draw text yourself and, sometimes, text is drawn for you by the controls you're using. No matter who does the drawing, you can often specify th...
Fonts
A font is an instance of the System.Drawing.Font class, which for each font includes a family, a style, and a size. And, as you might expect, a font family is an instance of the FontFamily class, which encapsulates a group of typefaces that ...
Strings
Of course, deciding on a font is only half the fun. The real action is drawing strings after a font has been picked. For that, you use the DrawString method of the Graphics object:
using( Font font = new Font("Arial", 12) ) {
// Thi...
The TextRenderer
The TextRenderer class, located in the System.Windows.Forms namespace, is an alternative to the Graphics class for text rendering. Although Graphics and TextRenderer provide similar levels of text-rendering capabilitie...
A Tale of Two Technologies
In general, text is rendered with a specific font to a specific location, and both Graphics and TextRenderer do that quite nicely. So, you might be wondering why there are two textrendering technologies in the .NET Frame...
Where Are We?
We've finished the basics of drawing that we started in Chapter 5: Drawing Basics. In Chapter 7: Advanced Drawing, we talk about advanced drawing topics, such as coordinate systems, regions, and transformations.
...
С 2009 года мы стали переводить структура сайта на различные языки. Сайт теперь будет содержать книги не только на английском языке, но также и на других европейских языках, в том числе и на Русском языке.