SkIRect rect = SkIRect::MakeXYWH(0, 0, 100, 100); rect.offset(10, 20); // The rectangle is now at position (10, 20), with size 100x100
SkIRect rect = SkIRect::MakeXYWH(50, 50, 100, 100); rect.offset(-5, -5); // The rectangle is now at position (45, 45), with size 100x100
SkIRect rect = SkIRect::MakeXYWH(0, 0, 50, 50); int x = 10, y = 20; rect.offset(x, y); // The rectangle is now at position (10, 20), with size 50x50In all the above examples, we first create a SkIRect object using the MakeXYWH() method, which creates a rectangle with the given (x, y) coordinates and width and height. We then call the offset() method on the rectangle object to move it by the given offset values. The SkIRect class is part of the Skia Graphics Library, which is an open-source cross-platform 2D graphics library developed by Google.