Module canvas_item

Consts

BLEND_MODE_MIX = 0'i64
BLEND_MODE_ADD = 1'i64
BLEND_MODE_SUB = 2'i64
BLEND_MODE_MUL = 3'i64
BLEND_MODE_PREMULT_ALPHA = 4'i64
BLEND_MODE_DISABLED = 5'i64
NOTIFICATION_TRANSFORM_CHANGED = 29'i64
NOTIFICATION_DRAW = 30'i64
NOTIFICATION_VISIBILITY_CHANGED = 31'i64
NOTIFICATION_ENTER_CANVAS = 32'i64
NOTIFICATION_EXIT_CANVAS = 33'i64

Procs

proc visible(self: CanvasItem): bool {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc visible=(self: CanvasItem; val: bool) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc modulate(self: CanvasItem): Color {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc modulate=(self: CanvasItem; val: Color) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc selfModulate(self: CanvasItem): Color {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc selfModulate=(self: CanvasItem; val: Color) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc showBehindParent(self: CanvasItem): bool {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc showBehindParent=(self: CanvasItem; val: bool) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc showOnTop(self: CanvasItem): bool {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc showOnTop=(self: CanvasItem; val: bool) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc lightMask(self: CanvasItem): int64 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc lightMask=(self: CanvasItem; val: int64) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc material(self: CanvasItem): Material {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc material=(self: CanvasItem; val: Material) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc useParentMaterial(self: CanvasItem): bool {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc useParentMaterial=(self: CanvasItem; val: bool) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getCanvasItem(self: CanvasItem): RID {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc isVisibleInTree(self: CanvasItem): bool {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc show(self: CanvasItem) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc hide(self: CanvasItem) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc update(self: CanvasItem) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc setAsToplevel(self: CanvasItem; enable: bool) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc isSetAsToplevel(self: CanvasItem): bool {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawLine(self: CanvasItem; fromm: Vector2; to: Vector2; color: Color;
             width: float64 = 1.0; antialiased: bool = false) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawPolyline(self: CanvasItem; points: PoolVector2Array; color: Color;
                 width: float64 = 1.0; antialiased: bool = false) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawPolylineColors(self: CanvasItem; points: PoolVector2Array;
                       colors: PoolColorArray; width: float64 = 1.0;
                       antialiased: bool = false) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawMultiline(self: CanvasItem; points: PoolVector2Array; color: Color;
                  width: float64 = 1.0; antialiased: bool = false) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawMultilineColors(self: CanvasItem; points: PoolVector2Array;
                        colors: PoolColorArray; width: float64 = 1.0;
                        antialiased: bool = false) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawRect(self: CanvasItem; rect: Rect2; color: Color; filled: bool = true) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawCircle(self: CanvasItem; position: Vector2; radius: float64; color: Color) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawTexture(self: CanvasItem; texture: Texture; position: Vector2;
                modulate: Color = initColor(1.0, 1.0, 1.0, 1.0);
                normalMap: Texture = nil) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawTextureRect(self: CanvasItem; texture: Texture; rect: Rect2; tile: bool;
                    modulate: Color = initColor(1.0, 1.0, 1.0, 1.0);
                    transpose: bool = false; normalMap: Texture = nil) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawTextureRectRegion(self: CanvasItem; texture: Texture; rect: Rect2;
                          srcRect: Rect2;
                          modulate: Color = initColor(1.0, 1.0, 1.0, 1.0);
                          transpose: bool = false; normalMap: Texture = nil;
                          clipUv: bool = true) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawStyleBox(self: CanvasItem; styleBox: StyleBox; rect: Rect2) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawPrimitive(self: CanvasItem; points: PoolVector2Array;
                  colors: PoolColorArray; uvs: PoolVector2Array;
                  texture: Texture = nil; width: float64 = 1.0; normalMap: Texture = nil) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawPolygon(self: CanvasItem; points: PoolVector2Array; colors: PoolColorArray;
                uvs: PoolVector2Array = newPoolVector2Array();
                texture: Texture = nil; normalMap: Texture = nil;
                antialiased: bool = false) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawColoredPolygon(self: CanvasItem; points: PoolVector2Array; color: Color;
                       uvs: PoolVector2Array = newPoolVector2Array();
                       texture: Texture = nil; normalMap: Texture = nil;
                       antialiased: bool = false) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawString(self: CanvasItem; font: Font; position: Vector2; text: string;
               modulate: Color = initColor(1.0, 1.0, 1.0, 1.0); clipW: int64 = -1'i64) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawChar(self: CanvasItem; font: Font; position: Vector2; char: string;
             next: string; modulate: Color = initColor(1.0, 1.0, 1.0, 1.0)): float64 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawMesh(self: CanvasItem; mesh: Mesh; texture: Texture; normalMap: Texture = nil) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawMultimesh(self: CanvasItem; mesh: Mesh; texture: Texture;
                  normalMap: Texture = nil) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawSetTransform(self: CanvasItem; position: Vector2; rotation: float64;
                     scale: Vector2) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc drawSetTransformMatrix(self: CanvasItem; xform: Transform2D) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getTransform(self: CanvasItem): Transform2D {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getGlobalTransform(self: CanvasItem): Transform2D {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getGlobalTransformWithCanvas(self: CanvasItem): Transform2D {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getViewportTransform(self: CanvasItem): Transform2D {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getViewportRect(self: CanvasItem): Rect2 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getCanvasTransform(self: CanvasItem): Transform2D {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getLocalMousePosition(self: CanvasItem): Vector2 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getGlobalMousePosition(self: CanvasItem): Vector2 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getCanvas(self: CanvasItem): RID {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc getWorld2d(self: CanvasItem): World2D {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}
proc setNotifyLocalTransform(self: CanvasItem; enable: bool) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc isLocalTransformNotificationEnabled(self: CanvasItem): bool {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc setNotifyTransform(self: CanvasItem; enable: bool) {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc isTransformNotificationEnabled(self: CanvasItem): bool {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc makeCanvasPositionLocal(self: CanvasItem; screenPoint: Vector2): Vector2 {.
gcsafe, locks: 0, raises: [], tags: []
.}
proc makeInputLocal(self: CanvasItem; event: InputEvent): InputEvent {.
gcsafe, locks: 0, raises: [Exception], tags: [RootEffect]
.}

Methods

method draw(self: CanvasItem) {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method toplevelRaiseSelf(self: CanvasItem) {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method updateCallback(self: CanvasItem) {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editSetState(self: CanvasItem; state: Dictionary) {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editGetState(self: CanvasItem): Dictionary {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editSetPosition(self: CanvasItem; position: Vector2) {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editGetPosition(self: CanvasItem): Vector2 {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editSetScale(self: CanvasItem; scale: Vector2) {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editGetScale(self: CanvasItem): Vector2 {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editSetRect(self: CanvasItem; rect: Rect2) {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editGetRect(self: CanvasItem): Rect2 {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editUseRect(self: CanvasItem): bool {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editGetItemAndChildrenRect(self: CanvasItem): Rect2 {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editSetRotation(self: CanvasItem; degrees: float64) {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editGetRotation(self: CanvasItem): float64 {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editUseRotation(self: CanvasItem): bool {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editSetPivot(self: CanvasItem; pivot: Vector2) {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editGetPivot(self: CanvasItem): Vector2 {.
gcsafe, locks: 0, base, raises: [], tags: []
.}
method editUsePivot(self: CanvasItem): bool {.
gcsafe, locks: 0, base, raises: [], tags: []
.}