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

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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
Available since 1.1
Return to top
Show: