offset method

GRect offset(
  1. double dx,
  2. double dy
)

Translates the rectangle's position by the specified dx and dy values. Determined by its top-left corner, by the specified amounts.

Implementation

GRect offset(double dx, double dy) {
  x += dx;
  y += dy;
  return this;
}