Click or drag to resize

CanvasItemDrawPrimitive Method

Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public void DrawPrimitive(
	Vector2[] points,
	Color[] colors,
	Vector2[] uvs,
	Texture texture = null,
	float width = 1f,
	Texture normalMap = null
)

Parameters

points
Type: GodotVector2

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

colors
Type: GodotColor

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

uvs
Type: GodotVector2

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

texture (Optional)
Type: GodotTexture

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

width (Optional)
Type: SystemSingle

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

normalMap (Optional)
Type: GodotTexture

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

See Also