CanvasLayer

Canvas drawing layer.

CanvasItem nodes that are direct or indirect children of a CanvasLayer will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a CanvasLayer with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

getCanvas
RID getCanvas()

Returns the RID of the canvas used by this layer.

getCustomViewport
Node getCustomViewport()
getLayer
long getLayer()
getOffset
Vector2 getOffset()
getRotation
double getRotation()
getRotationDegrees
double getRotationDegrees()
getScale
Vector2 getScale()
getTransform
Transform2D getTransform()
opAssign
CanvasLayer opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(CanvasLayer other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
setCustomViewport
void setCustomViewport(GodotObject viewport)
setLayer
void setLayer(long layer)
setOffset
void setOffset(Vector2 offset)
setRotation
void setRotation(double radians)
setRotationDegrees
void setRotationDegrees(double degrees)
setScale
void setScale(Vector2 scale)
setTransform
void setTransform(Transform2D transform)

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

customViewport
GodotObject customViewport [@property setter]

The custom Viewport node assigned to the CanvasLayer. If null, uses the default viewport instead.

customViewport
Node customViewport [@property getter]

The custom Viewport node assigned to the CanvasLayer. If null, uses the default viewport instead.

layer
long layer [@property getter]
long layer [@property setter]

Layer index for draw order. Lower values are drawn first. Default value: 1.

offset
Vector2 offset [@property getter]
Vector2 offset [@property setter]

The layer's base offset.

rotation
double rotation [@property getter]
double rotation [@property setter]

The layer's rotation in radians.

rotationDegrees
double rotationDegrees [@property getter]
double rotationDegrees [@property setter]

The layer's rotation in degrees.

scale
Vector2 scale [@property getter]
Vector2 scale [@property setter]

The layer's scale.

transform
Transform2D transform [@property getter]
Transform2D transform [@property setter]

The layer's transform.

Static functions

_new
CanvasLayer _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta