nuke.Box
- class nuke.Box
Bases:
pybind11_objectA 2-dimensional rectangle. Described by left, right, top and bottom coords (width and height are calculated as necessary).
Methods
self.centerX() -> float
self.centerY() -> float
self.clampX(x) -> int.
self.clampY(y) -> int.
self.clear() -> None.
self.h() -> int
self.intersect(x, y, r, t) -> None.
self.isConstant() -> True if box is 1x1 in both directions, False otherwise.
self.merge(x, y, r, t) -> None.
self.move(dx, dy) -> None.
Expand the box by (dx, dy) on each side.
self.r() -> int
self.set(x, y, r, t) -> None
self.setH(n) -> None
self.setR(n) -> None
self.setT(n) -> None
self.setW(n) -> None
self.setX(n) -> None
self.setY(n) -> None
self.t() -> int
self.w() -> int
self.x() -> int
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.