Click or drag to resize

DXFReaderNETControlDrawText Method (Pen, String, Vector2, Double, Double, FontStyle, StringAlignment, Boolean)

Draws a text on the control.

Namespace:  DXFReaderNET
Assembly:  DXFReaderNET (in DXFReaderNET.dll) Version: 20.12.2
Syntax
public void DrawText(
	Pen Pen,
	string Text,
	Vector2 Position,
	double TextHeight,
	double Rotation = 0,
	FontStyle Style = FontStyle.Regular,
	StringAlignment Alignment = StringAlignment.Near,
	bool Store = false
)

Parameters

Pen
Type: System.DrawingPen
the pen object to render the element
Text
Type: SystemString
the text
Position
Type: DXFReaderNETVector2
position of the text in drawing's units.
TextHeight
Type: SystemDouble
height of the text in drawing's units
Rotation (Optional)
Type: SystemDouble
Text rotation about position.
Style (Optional)
Type: System.DrawingFontStyle
Specifies style information applied to text.
Alignment (Optional)
Type: System.DrawingStringAlignment
The text alignment (Default value = StringAlignment.Near).
Store (Optional)
Type: SystemBoolean
If set to true the element is drawn again after a refresh.
Remarks
This method adds a text to the drawing without modifying the drawing database. Can be used for for temporary visualizations, such as highlighting or previewing elements, without making permanent changes to the DXF data.
See Also