Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

GraphicsPath.AddString Method (String, FontFamily, Int32, Single, Rectangle, StringFormat)

Adds a text string to this path.

Namespace:  System.Drawing.Drawing2D
Assembly:  System.Drawing (in System.Drawing.dll)

public void AddString(
	string s,
	FontFamily family,
	int style,
	float emSize,
	Rectangle layoutRect,
	StringFormat format


Type: System.String

The String to add.

Type: System.Drawing.FontFamily

A FontFamily that represents the name of the font with which the test is drawn.

Type: System.Int32

A FontStyle enumeration that represents style information about the text (bold, italic, and so on). This must be cast as an integer (see the example code later in this section).

Type: System.Single

The height of the em square box that bounds the character.

Type: System.Drawing.Rectangle

A Rectangle that represents the rectangle that bounds the text.

Type: System.Drawing.StringFormat

A StringFormat that specifies text formatting information, such as line spacing and alignment.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft