Environment.DrawText (Int32, Int32, String, Font, Color, Color, ContentAlignment, RotateFlipType) Method

Draws a text on the Environment's client area.
Protected Friend Function DrawText( _ 
ByVal x As Integer, _ 
ByVal y As Integer, _ 
ByVal text As String, _ 
ByVal textFont As Font, _ 
ByVal textColor As Color, _ 
ByVal fillColor As Color, _ 
ByVal textAlign As ContentAlignment, _ 
ByVal rotateFlip As RotateFlipType
) As Size
This language is not supported or no code example is available.
internal protected Size DrawText( 
int x
int y
string text
Font textFont
Color textColor
Color fillColor
ContentAlignment textAlign
RotateFlipType rotateFlip 
)
This language is not supported or no code example is available.

Parameters

x
int

The text x coordinate

y
int

The text y coordinate (from the bottom of the viewport)

text
string

The text string to draw

textFont
Font

The text font

textColor
Color

The text color

fillColor
Color

The background color (can be semi-transparent)

textAlign
ContentAlignment

The text alignment

rotateFlip
RotateFlipType

The text rotation

Return Value

Size

The size of the text bitmap

Remarks
 
For better performances use GetTextImage, create the texture and draw it directly.

.NET Framework

Supported in: 4.5, 4.6, 4.7

In this article

Definition