BRect myRect(50, 50, 150, 150); myRect.InsetBy(30, 30); //After the call to InsetBy, myRect's values are (80, 80, 120, 120)
BRect myRect(10, 10, 90, 80); myRect.InsetBy(0, 0, 0, -50); //After the call to InsetBy, myRect's values are (10, 10, 90, 30)These examples demonstrate the use of InsetBy function to scale the sides of a rectangle. The BRect class is part of the Be API library, which is a set of C++ libraries and classes for developing graphical user interface applications on the BeOS and Haiku operating systems.