Click or drag to resize

CanvasItemDrawTextureRectRegion Method

Draws a textured rectangle region at a given position, optionally modulated by a color. If transpose is true, the texture will have its X and Y coordinates swapped.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public void DrawTextureRectRegion(
	Texture texture,
	Rect2 rect,
	Rect2 srcRect,
	Color? modulate = null,
	bool transpose = false,
	Texture normalMap = null,
	bool clipUv = true
)

Parameters

texture
Type: GodotTexture

[Missing <param name="texture"/> documentation for "M:Godot.CanvasItem.DrawTextureRectRegion(Godot.Texture,Godot.Rect2,Godot.Rect2,System.Nullable{Godot.Color},System.Boolean,Godot.Texture,System.Boolean)"]

rect
Type: GodotRect2

[Missing <param name="rect"/> documentation for "M:Godot.CanvasItem.DrawTextureRectRegion(Godot.Texture,Godot.Rect2,Godot.Rect2,System.Nullable{Godot.Color},System.Boolean,Godot.Texture,System.Boolean)"]

srcRect
Type: GodotRect2

[Missing <param name="srcRect"/> documentation for "M:Godot.CanvasItem.DrawTextureRectRegion(Godot.Texture,Godot.Rect2,Godot.Rect2,System.Nullable{Godot.Color},System.Boolean,Godot.Texture,System.Boolean)"]

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

[Missing <param name="transpose"/> documentation for "M:Godot.CanvasItem.DrawTextureRectRegion(Godot.Texture,Godot.Rect2,Godot.Rect2,System.Nullable{Godot.Color},System.Boolean,Godot.Texture,System.Boolean)"]

normalMap (Optional)
Type: GodotTexture

[Missing <param name="normalMap"/> documentation for "M:Godot.CanvasItem.DrawTextureRectRegion(Godot.Texture,Godot.Rect2,Godot.Rect2,System.Nullable{Godot.Color},System.Boolean,Godot.Texture,System.Boolean)"]

clipUv (Optional)
Type: SystemBoolean

[Missing <param name="clipUv"/> documentation for "M:Godot.CanvasItem.DrawTextureRectRegion(Godot.Texture,Godot.Rect2,Godot.Rect2,System.Nullable{Godot.Color},System.Boolean,Godot.Texture,System.Boolean)"]

See Also