sketches
    Preparing search index...

    Defines the width-to-height ratio of a canvas or graphic.

    Index

    Constructors

    Accessors

    Methods

    • Parameters

      • resolution: number

        {number} - The target resolution.

      • OptionalapplyToLongSide: boolean

        {boolean} - When true, the long side of the canvas or graphic will be equal to the target resolution. This means that the maximum width or height of the canvas or graphic will be equal to the target resolution.

      Returns number

      The height of the canvas or graphic given the target resolution.

    • Parameters

      • resolution: number

        {number} - The target resolution.

      • OptionalapplyToLongSide: boolean

        {boolean} - When true, the long side of the canvas or graphic will be equal to the target resolution. This means that the maximum width or height of the canvas or graphic will be equal to the target resolution.

      Returns number

      The width of the canvas or graphic given the target resolution.