comp • gb.qt4 • rect • stretch

Rect.Stretch (gb.qt4)

Static Function Stretch ( Width As Integer, Height As Integer, Frame As Rect [ , Alignment As Integer ] ) As Rect

Stretch a rectangle so that it fits inside a target rectangle frame while keeping its proportions, and return the geometry of the final rectangle.

  • Width and Height are the size of the initial rectangle.

  • Frame is the target rectangle.

  • Alignment is one of the Align constants that defines the relative position of the initial rectangle inside the target rectangle. By default it is centered.