DrawText Method (String, Font, Color, Int32, Int32, Int32, Int32, TextAlignment, TextTrimming)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Draws specified text within a bounding rectangular region on the drawing surface.
Namespace: Microsoft.SPOT.Presentation.Media
Assembly: Microsoft.SPOT.TinyCore (in Microsoft.SPOT.TinyCore.dll)
Syntax
'Declaration
Public Function DrawText ( _
ByRef text As String, _
font As Font, _
color As Color, _
x As Integer, _
y As Integer, _
width As Integer, _
height As Integer, _
alignment As TextAlignment, _
trimming As TextTrimming _
) As Boolean
public bool DrawText(
ref string text,
Font font,
Color color,
int x,
int y,
int width,
int height,
TextAlignment alignment,
TextTrimming trimming
)
public:
bool DrawText(
String^% text,
Font^ font,
Color color,
int x,
int y,
int width,
int height,
TextAlignment alignment,
TextTrimming trimming
)
member DrawText :
text:string byref *
font:Font *
color:Color *
x:int *
y:int *
width:int *
height:int *
alignment:TextAlignment *
trimming:TextTrimming -> bool
public function DrawText(
text : String,
font : Font,
color : Color,
x : int,
y : int,
width : int,
height : int,
alignment : TextAlignment,
trimming : TextTrimming
) : boolean
Parameters
- text
Type: System. . :: . .String%
The string that contains the text to be drawn.
- font
Type: Microsoft.SPOT. . :: . .Font
The font to be applied to the specified text.
- color
Type: Microsoft.SPOT.Presentation.Media. . :: . .Color
The color to be applied to the specified text.
- x
Type: System. . :: . .Int32
The horizontal coordinate of the left edge of the rectangular region in which the specified text is to be drawn.
- y
Type: System. . :: . .Int32
The vertical coordinate of the top edge of the rectangular region in which the specified text is to be drawn.
- width
Type: System. . :: . .Int32
The width of the rectangular region in which the specified text is to be drawn.
- height
Type: System. . :: . .Int32
The height of the rectangular region in which the specified text is to be drawn.
- alignment
Type: Microsoft.SPOT.Presentation.Media. . :: . .TextAlignment
A value of the TextAlignment enumeration that specifies the edge with which the specified text is to be aligned.
- trimming
Type: Microsoft.SPOT.Presentation.Media. . :: . .TextTrimming
A value of the TextTrimming enumeration that specifies how characters from a string that does not completely fit into the specified rectangular region are to be trimmed.
Return Value
Type: System. . :: . .Boolean
true if the text fits within the specified bounds; otherwise, false.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.