[]
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.
public int DrawString(string text, Font font, Color color, RectangleF rc, int firstChar, StringFormat sf)
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. |
int | firstChar | Index of the first character that will be rendered. |
StringFormat | sf | StringFormat object that specifies formatting attributes applied to the drawn text. |
Type | Description |
---|---|
int | The index of first character that was not printed because it did not fit in the specified rectangle. |
Draws the specified text string in the specified rectangle, with the specified Color and Font, using the formatting attributes of the specified StringFormat object and specified character width coefficient.
public int DrawString(string text, Font font, Color color, RectangleF rc, int firstChar, StringFormat sf, float widthCoeff)
Type | Name | Description |
---|---|---|
string | text | The string to draw. |
Font | font | The Font used to draw the text. |
Color | color | The text color. |
RectangleF | rc | The rectangle specifying the location of the text, in points from the top left corner of the page. |
int | firstChar | The index of the first character that will be rendered. |
StringFormat | sf | The StringFormat object specifying the formatting attributes applied to the text. |
float | widthCoeff | The width coefficient applied to characters. The default is 1.0, use 2.0 for double width and so on. |
Type | Description |
---|---|
int | The index of the first character that was not rendered because it did not fit in the specified rectangle. |
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.
public int DrawString(string text, Font font, Color color, RectangleF rc, StringFormat sf)
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. |
Type | Description |
---|---|
int | The index of first character that was not printed because it did not fit in the specified rectangle. |
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.
public int DrawString(string text, Font font, Color color, RectangleF rc, StringFormat sf, float widthCoeff)
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. |
float | widthCoeff | The width coefficient of text characters, by default 1.0, for double width 2.0. |
Type | Description |
---|---|
int | The index of first character that was not printed because it did not fit in the specified rectangle. |
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.
public int DrawString(string text, Font font, Color color, RectangleF rc, int firstChar)
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. |
int | firstChar | Index of the first character that will be rendered. |
Type | Description |
---|---|
int | The index of first character that was not printed because it did not fit in the specified rectangle. |
Draws the specified text string in the specified rectangle with the specified Color and Font objects.
public int DrawString(string text, Font font, Color color, RectangleF rc)
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. |
Type | Description |
---|---|
int | The index of first character that was not printed because it did not fit in the specified rectangle. |
This overload renders strings aligned to the top left corner of the specified rectangle, wrapping text as needed within the rectangle, without clipping, and in the horizontal direction. To change any of these defaults, use the overload that allows you to specify a StringFormat parameter.
Draws the specified text string at the specified point with the specified Color and Font objects using the formatting attributes of the specified StringFormat object.
public int DrawString(string text, Font font, Color color, PointF pt, StringFormat sf)
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 |
StringFormat | sf | StringFormat object that specifies formatting attributes applied to the drawn text. |
Type | Description |
---|---|
int | The index of first character that was not printed because it did not fit in the specified rectangle. |
Draws the specified text string at the specified point with the specified Color and Font objects using the formatting attributes of the specified StringFormat object and specified width coefficient of text characters.
public int DrawString(string text, Font font, Color color, PointF pt, StringFormat sf, float widthCoeff)
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 |
StringFormat | sf | StringFormat object that specifies formatting attributes applied to the drawn text. |
float | widthCoeff | The width coefficient of text characters, by default 1.0, for double width 2.0. |
Type | Description |
---|---|
int | The index of first character that was not printed because it did not fit in the specified rectangle. |
public int DrawString(string text, Font font, Color color, PointF pt)
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. |
Type | Description |
---|---|
int | The index of first character that was not printed because it did not fit in the specified rectangle. |
Draws the specified text string at the specified point with the specified Color, Font objects and specified width coefficient of text characters.
public int DrawString(string text, Font font, Color color, PointF pt, float widthCoeff = 1)
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. |
float | widthCoeff | The width coefficient of text characters, by default 1.0, for double width 2.0.. |
Type | Description |
---|---|
int | The index of first character that was not printed because it did not fit in the specified rectangle. |