translate method

Rectangle translate(
  1. double translateX,
  2. double translateY
)

Returns a new rectangle with translateX added to the x components and translateY added to the y components.

To translate a rectangle by an vm.Vector2 rather than by separate x and y components, consider shift.

Implementation

Rectangle translate(double translateX, double translateY) {
  return Rectangle.fromLTRB(left + translateX, top + translateY,
      right + translateX, bottom + translateY);
}