nuke.Box

class nuke.Box

Bases: pybind11_object

A 2-dimensional rectangle. Described by left, right, top and bottom coords (width and height are calculated as necessary).

Methods

centerX

self.centerX() -> float

centerY

self.centerY() -> float

clampX

self.clampX(x) -> int.

clampY

self.clampY(y) -> int.

clear

self.clear() -> None.

h

self.h() -> int

intersect

self.intersect(x, y, r, t) -> None.

isConstant

self.isConstant() -> True if box is 1x1 in both directions, False otherwise.

merge

self.merge(x, y, r, t) -> None.

move

self.move(dx, dy) -> None.

pad

Expand the box by (dx, dy) on each side.

r

self.r() -> int

set

self.set(x, y, r, t) -> None

setH

self.setH(n) -> None

setR

self.setR(n) -> None

setT

self.setT(n) -> None

setW

self.setW(n) -> None

setX

self.setX(n) -> None

setY

self.setY(n) -> None

t

self.t() -> int

w

self.w() -> int

x

self.x() -> int

y

self.y() -> int

centerX() float

Return center in X.

centerY() float

Return height in Y.

clampX(x) int.

Return x restricted to pointing at a pixel in the box.

clampY(y) int.

Return y restricted to pointing at a pixel in the box.

clear() None.

Set to is_constant().

h() int

Return height.

intersect(x, y, r, t) None.

Intersect with the given edges. self.intersect(box) -> None.

Intersect with the given edges.

isConstant() True if box is 1x1 in both directions, False otherwise.
merge(x, y, r, t) None.

Merge with the given edges. self.merge(box) -> None.

Merge with the given edges.

move(dx, dy) None.

Move all the sides and thus the entire box by the given deltas.

pad()

Expand the box by (dx, dy) on each side. self.pad(dx, dy, dr, dt) -> None.

Move all the sides and thus the entire box by the given deltas.

r() int

Return the right edge of the box.

set(x, y, r, t) None

Set all values at once.

setH(n) None

Set height by moving top edge.

setR(n) None

Set the right edge. The parameter n is an integer.

setT(n) None

Set top edge.

setW(n) None

Set width by moving right edge.

setX(n) None

Set the left edge. The parameter n is an integer.

setY(n) None

Set the bottom edge. The parameter n is an integer.

t() int

Return top edge.

w() int

Return width.

x() int

The left edge of the box.

y() int

Return the bottom edge.