rmapi-js
    Preparing search index...

    Class PageSize

    the size of a page to lay a template out on, in pixels: its screen as the page stands, and how tall it has grown by being scrolled down

    new PageSize(width, height) is a page the screen's size, and PageSize.scrolled one grown taller. Both refuse a size no page could have, so Template.layout is only ever given a real one.

    const page = new PageSize(1404, 1872).scrolled(2400);
    const drawing = Template.builtIn("linesSmall").layout(page);
    Index
    • a page width by height, the screen as the page stands, not scrolled

      Parameters

      • width: number
      • height: number

      Returns PageSize

      RangeError if width or height is not a finite number above 0

    height: number

    the screen's height

    width: number

    the screen's width, the page's

    • get pageHeight(): number

      the page's height, the screen's or more once it is scrolled down

      Returns number

    • this page grown pageHeight tall by being scrolled down, its screen the same

      Parameters

      • pageHeight: number

      Returns PageSize

      RangeError if pageHeight is not finite or is less than the screen's height, since a page is never shorter than its screen