nuke.Box

class nuke.Box

Bases: object

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

Methods

centerX

Return center in X.

centerY

Return height in Y.

clampX

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

clampY

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

clear

Set to is_constant().

h

Return height.

intersect

Intersect with the given edges.

isConstant

merge

Merge with the given edges.

move

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

pad

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

r

Return the right edge of the box.

set

Set all values at once.

setH

Set height by moving top edge.

setR

Set the right edge.

setT

Set top edge.

setW

Set width by moving right edge.

setX

Set the left edge.

setY

Set the bottom edge.

t

Return top edge.

w

Return width.

x

The left edge of the box.

y

Return the bottom edge.

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.

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

Merge with the given edges.

move(dx, dy) None.

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

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.