Vertex Viewer SDK
    Preparing search index...

    Function scaleFit

    • Returns a rectangle where each side of rect will be reduced proportionally to have an area less than or equal to the provided to value. The returned rectangle will be centered within the original bounds of rect.

      Parameters

      • to: number

        the maximum area this rectangle can have

      • rect: Rectangle.Rectangle

        the rectangle to scale to fit the specified area

      Returns Rectangle.Rectangle