[api-minor] Render pushbuttons on their own canvas (bug 1737260)

- First step to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1737260;
 - several interactive pdfs use the possibility to hide/show buttons to show different icons;
 - render pushbuttons on their own canvas and then insert it the annotation_layer;
 - update test/driver.js in order to convert canvases for pushbuttons into images.
This commit is contained in:
Calixte Denizet 2021-11-06 18:36:49 +01:00
parent 891f21fba6
commit 33ea817b20
13 changed files with 333 additions and 86 deletions

View file

@ -175,6 +175,8 @@ class IPDFAnnotationLayerFactory {
* @param {Object} [mouseState]
* @param {Promise<Object<string, Array<Object>> | null>}
* [fieldObjectsPromise]
* @property {Map<string, Canvas> | null} [annotationCanvasMap] - Map some
* annotation ids with canvases used to render them.
* @returns {AnnotationLayerBuilder}
*/
createAnnotationLayerBuilder(
@ -187,7 +189,8 @@ class IPDFAnnotationLayerFactory {
enableScripting = false,
hasJSActionsPromise = null,
mouseState = null,
fieldObjectsPromise = null
fieldObjectsPromise = null,
annotationCanvasMap = null
) {}
}