access to raw image data
This commit is contained in:
@@ -224,6 +224,18 @@ export default class Display {
|
||||
this.viewportChangePos(0, 0);
|
||||
}
|
||||
|
||||
getImageData() {
|
||||
return this._drawCtx.getImageData(0, 0, this.width, this.height);
|
||||
}
|
||||
|
||||
toDataURL(type, encoderOptions) {
|
||||
return this._backbuffer.toDataURL(type, encoderOptions);
|
||||
}
|
||||
|
||||
toBlob(callback, type, quality) {
|
||||
return this._backbuffer.toBlob(callback, type, quality);
|
||||
}
|
||||
|
||||
// Track what parts of the visible canvas that need updating
|
||||
_damage(x, y, w, h) {
|
||||
if (x < this._damageBounds.left) {
|
||||
|
||||
12
core/rfb.js
12
core/rfb.js
@@ -500,6 +500,18 @@ export default class RFB extends EventTargetMixin {
|
||||
}
|
||||
}
|
||||
|
||||
getImageData() {
|
||||
return this._display.getImageData();
|
||||
}
|
||||
|
||||
toDataURL(type, encoderOptions) {
|
||||
return this._display.toDataURL(type, encoderOptions);
|
||||
}
|
||||
|
||||
toBlob(callback, type, quality) {
|
||||
return this._display.toBlob(callback, type, quality);
|
||||
}
|
||||
|
||||
// ===== PRIVATE METHODS =====
|
||||
|
||||
_connect() {
|
||||
|
||||
Reference in New Issue
Block a user