[api-minor] Deprecate the imageLayer
functionality
This functionality has never been used anywhere in the PDF.js library/viewer itself, since it was added in 2013. Furthermore this functionality is, and has always been, *completely untested* and also unmaintained. Finally, there's (at least) one old issue about `appendImage` not returning the correct position; see issue 4182. All-in-all, it seems that keeping very old, untested, unmaintained, and partially broken code around probably isn't what we want here. (On the off-chance that any future a11y-work requires getting access to image-positions, it'd likely be much better to re-implement the necessary functionality from scratch and also make sure that it's properly tested from the beginning.)
This commit is contained in:
parent
3c8aeb445a
commit
118da8e85d
@ -13,6 +13,13 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import {
|
||||||
|
deprecated,
|
||||||
|
getCurrentTransform,
|
||||||
|
getCurrentTransformInverse,
|
||||||
|
getRGB,
|
||||||
|
PixelsPerInch,
|
||||||
|
} from "./display_utils.js";
|
||||||
import {
|
import {
|
||||||
FeatureTest,
|
FeatureTest,
|
||||||
FONT_IDENTITY_MATRIX,
|
FONT_IDENTITY_MATRIX,
|
||||||
@ -26,12 +33,6 @@ import {
|
|||||||
Util,
|
Util,
|
||||||
warn,
|
warn,
|
||||||
} from "../shared/util.js";
|
} from "../shared/util.js";
|
||||||
import {
|
|
||||||
getCurrentTransform,
|
|
||||||
getCurrentTransformInverse,
|
|
||||||
getRGB,
|
|
||||||
PixelsPerInch,
|
|
||||||
} from "./display_utils.js";
|
|
||||||
import {
|
import {
|
||||||
getShadingPattern,
|
getShadingPattern,
|
||||||
PathType,
|
PathType,
|
||||||
@ -1184,6 +1185,9 @@ class CanvasGraphics {
|
|||||||
this.baseTransform = getCurrentTransform(this.ctx);
|
this.baseTransform = getCurrentTransform(this.ctx);
|
||||||
|
|
||||||
if (this.imageLayer) {
|
if (this.imageLayer) {
|
||||||
|
deprecated(
|
||||||
|
"The `imageLayer` functionality will be removed in the future."
|
||||||
|
);
|
||||||
this.imageLayer.beginLayout();
|
this.imageLayer.beginLayout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user