Interface Page

    • Method Detail

      • getSourceURL

        URL getSourceURL()
        Obtains the source URL of the page.
        Returns:
        the URL
      • getTitle

        String getTitle()
        Obtains the page title specified using the <title> tag.
        Returns:
        the page title or an empty string when not set
      • getWidth

        int getWidth()
        Obtains the page width.
        Returns:
        the width in pixels
      • getHeight

        int getHeight()
        Obtains the page height.
        Returns:
        the height in pixels
      • getRoot

        Box getRoot()
        Returns the root box of the page.
        Returns:
        the root box
      • getPngImage

        byte[] getPngImage()
        Gets the PNG image of the rendered page if provided by the renderer.
        Returns:
        PNG image data array or null when the page image was not provided by the renderer.
      • getBoxesAt

        List<Box> getBoxesAt​(int x,
                             int y)
        Finds all the boxes that contain the given point within their visual bounds.
        Parameters:
        x - The point X coordinate
        y - The point Y coordinate
        Returns:
        A list of boxes that contain [x, y] within their visual bounds.
      • getBoxesInRegion

        List<Box> getBoxesInRegion​(Rectangular r)
        Finds the root boxes of subtrees that are fully contained in the given region based on their visual bounds.
        Parameters:
        r - The region to be tested
        Returns:
        A list of subtree root boxes (possibly empty)
      • createBox

        Box createBox()
        Creates a new empty box wihtin this page.
        Returns:
        the new box
      • createBox

        Box createBox​(Box src)
        Creates a new box within this page by copying an existing one.
        Parameters:
        src - the source box to copy
        Returns:
        the new box