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
)

Parameters

s
Type: System.String

The String to add.

family
Type: System.Drawing.FontFamily

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

style
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).

emSize
Type: System.Single

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

layoutRect
Type: System.Drawing.Rectangle

A Rectangle that represents the rectangle that bounds the text.

format
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
Show:
© 2015 Microsoft