[]
        
(Showing Draft Content)

C1.Util.IFlowDocument.DrawString

DrawString Method

DrawString(string, Font, Color, RectangleF)

Draws the specified text string in the specified rectangle with the specified Color and Font objects.

Declaration
int DrawString(string text, Font font, Color color, RectangleF rc)
Parameters
Type Name Description
string text

String to draw.

Font font

Font object that defines the appearance and size of the drawn text.

Color color

The color of the drawn text.

RectangleF rc

The rectangle structure that specifies the location of the drawn text, in points from the top left corner of the page.

Returns
Type Description
int

The index of first character that was not printed because it did not fit in the specified rectangle.

DrawString(string, Font, Color, RectangleF, StringFormat)

Draws the specified text string in the specified rectangle with the specified Color and Font objects using the formatting attributes of the specified StringFormat object.

Declaration
int DrawString(string text, Font font, Color color, RectangleF rc, StringFormat sf)
Parameters
Type Name Description
string text

String to draw.

Font font

Font object that defines the appearance and size of the drawn text.

Color color

The color of the drawn text.

RectangleF rc

The rectangle structure that specifies the location of the drawn text, in points from the top left corner of the page.

StringFormat sf

StringFormat object that specifies formatting attributes applied to the drawn text.

Returns
Type Description
int

The index of first character that was not printed because it did not fit in the specified rectangle.

DrawString(string, Font, Color, PointF)

Draws the specified text string at the specified point with the specified Color and Font objects.

Declaration
int DrawString(string text, Font font, Color color, PointF pt)
Parameters
Type Name Description
string text

String to draw.

Font font

Font object that defines the appearance and size of the drawn text.

Color color

The object that defines the color of the drawn text.

PointF pt

The point structure that specifies the location of the drawn text, in points from the top left corner of the page.

Returns
Type Description
int

The index of first character that was not printed because it did not fit in the specified rectangle.