Click or drag to resize

CanvasItemDrawLine Method

Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public void DrawLine(
	Vector2 from,
	Vector2 to,
	Color color,
	float width = 1f,
	bool antialiased = false
)

Parameters

from
Type: GodotVector2

[Missing <param name="from"/> documentation for "M:Godot.CanvasItem.DrawLine(Godot.Vector2,Godot.Vector2,Godot.Color,System.Single,System.Boolean)"]

to
Type: GodotVector2

[Missing <param name="to"/> documentation for "M:Godot.CanvasItem.DrawLine(Godot.Vector2,Godot.Vector2,Godot.Color,System.Single,System.Boolean)"]

color
Type: GodotColor

[Missing <param name="color"/> documentation for "M:Godot.CanvasItem.DrawLine(Godot.Vector2,Godot.Vector2,Godot.Color,System.Single,System.Boolean)"]

width (Optional)
Type: SystemSingle

[Missing <param name="width"/> documentation for "M:Godot.CanvasItem.DrawLine(Godot.Vector2,Godot.Vector2,Godot.Color,System.Single,System.Boolean)"]

antialiased (Optional)
Type: SystemBoolean

[Missing <param name="antialiased"/> documentation for "M:Godot.CanvasItem.DrawLine(Godot.Vector2,Godot.Vector2,Godot.Color,System.Single,System.Boolean)"]

See Also