@batpb/genart - v2.0.0-rc.3-alpha.2
    Preparing search index...

    Class AspectRatio

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

    2.0.0

    Index

    Constructors

    Accessors

    • get HEIGHT_RATIO(): number

      Returns number

      The height component of the aspect ratio.

      2.0.0

    • get NAME(): string

      Returns string

      The name of the aspect ratio.

      2.0.0

    • get WIDTH_RATIO(): number

      Returns number

      The width component of the aspect ratio.

      2.0.0

    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.

      Returns number

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

      2.0.0

    • 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.

      Returns number

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

      2.0.0