]> git.proxmox.com Git - mirror_novnc.git/blame - core/decoders/copyrect.js
feat: add French localization strings
[mirror_novnc.git] / core / decoders / copyrect.js
CommitLineData
923cd220
PO
1/*
2 * noVNC: HTML5 VNC client
412d9306 3 * Copyright (C) 2019 The noVNC Authors
923cd220
PO
4 * Licensed under MPL 2.0 (see LICENSE.txt)
5 *
6 * See README.md for usage and integration instructions.
7 *
8 */
9
10export default class CopyRectDecoder {
11 decodeRect(x, y, width, height, sock, display, depth) {
12 if (sock.rQwait("COPYRECT", 4)) {
13 return false;
14 }
15
16 let deltaX = sock.rQshift16();
17 let deltaY = sock.rQshift16();
113fa27e
PO
18
19 if ((width === 0) || (height === 0)) {
20 return true;
21 }
22
923cd220
PO
23 display.copyImage(deltaX, deltaY, x, y, width, height);
24
25 return true;
26 }
27}