Attach (recommended) or Link to PDF file here: Any

Configuration:
- Web browser and its version: Firefox 105.0.3
- Operating system and its version: macOS 11.6
- PDF.js version: 3.0.206 (latest demo)
- Is a browser extension: no

Steps to reproduce the problem:
1. Draw some annotation
2. Resize it using the handle
3. Zoom the viewer in/out

What is the expected behavior? (add screenshot)
The annotation should scale with the page.

What went wrong? (add screenshot)
Did not scale.

![zoom-annot](https://user-images.githubusercontent.com/18247990/195622628-2e98b7ff-ee29-4967-918c-ccb1fc3f915e.gif)

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): N/A

}
    points.push(p40, p41);
  }
  /**
   * Check if a cubic Bezier curve is almost flat.
   * @param {number} p10
   * @param {number} p11
   * @param {number} p20
   * @param {number} p21
   * @param {number} p30
   * @param {number} p31
   * @param {number} p40
   * @param {number} p41
   * @returns {boolean}
   */
  #isAlmostFlat(p10, p11, p20, p21, p30, p31, p40, p41) {
    
    
    const tol = 10;
    const ax = (3 * p20 - 2 * p10 - p40) ** 2;
    const ay = (3 * p21 - 2 * p11 - p41) ** 2;
    const bx = (3 * p30 - p10 - 2 * p40) ** 2;
    const by = (3 * p31 - p11 - 2 * p41) ** 2;
    return Math.max(ax, bx) + Math.max(ay, by) <= tol;
  }
  /**
   * Get the bounding box containing all the paths.
   * @returns {Array<number>}
   */
  #getBbox() {