Click or drag to resize

FontDraw Method

Draw string into a canvas item using the font at a given position, with modulate color, and optionally clipping the width. position specifies the baseline, not the top. To draw from the top, ascent must be added to the Y axis.

See also DrawString(Font, Vector2, String, NullableColor, Int32).

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public void Draw(
	RID canvasItem,
	Vector2 position,
	string string,
	Color? modulate = null,
	int clipW = -1,
	Color? outlineModulate = null
)

Parameters

canvasItem
Type: GodotRID

[Missing <param name="canvasItem"/> documentation for "M:Godot.Font.Draw(Godot.RID,Godot.Vector2,System.String,System.Nullable{Godot.Color},System.Int32,System.Nullable{Godot.Color})"]

position
Type: GodotVector2

[Missing <param name="position"/> documentation for "M:Godot.Font.Draw(Godot.RID,Godot.Vector2,System.String,System.Nullable{Godot.Color},System.Int32,System.Nullable{Godot.Color})"]

string
Type: SystemString

[Missing <param name="string"/> documentation for "M:Godot.Font.Draw(Godot.RID,Godot.Vector2,System.String,System.Nullable{Godot.Color},System.Int32,System.Nullable{Godot.Color})"]

modulate (Optional)
Type: SystemNullableColor
If the parameter is null, then the default value is new Color(1, 1, 1, 1)
clipW (Optional)
Type: SystemInt32

[Missing <param name="clipW"/> documentation for "M:Godot.Font.Draw(Godot.RID,Godot.Vector2,System.String,System.Nullable{Godot.Color},System.Int32,System.Nullable{Godot.Color})"]

outlineModulate (Optional)
Type: SystemNullableColor
If the parameter is null, then the default value is new Color(1, 1, 1, 1)
See Also