MCPcopy Create free account
hub / github.com/apache/cloudstack / decodeRect

Method decodeRect

systemvm/agent/noVNC/core/decoders/rre.js:15–43  ·  view source on GitHub ↗
(x, y, width, height, sock, display, depth)

Source from the content-addressed store, hash-verified

13 }
14
15 decodeRect(x, y, width, height, sock, display, depth) {
16 if (this._subrects === 0) {
17 if (sock.rQwait("RRE", 4 + 4)) {
18 return false;
19 }
20
21 this._subrects = sock.rQshift32();
22
23 let color = sock.rQshiftBytes(4); // Background
24 display.fillRect(x, y, width, height, color);
25 }
26
27 while (this._subrects > 0) {
28 if (sock.rQwait("RRE", 4 + 8)) {
29 return false;
30 }
31
32 let color = sock.rQshiftBytes(4);
33 let sx = sock.rQshift16();
34 let sy = sock.rQshift16();
35 let swidth = sock.rQshift16();
36 let sheight = sock.rQshift16();
37 display.fillRect(x + sx, y + sy, swidth, sheight, color);
38
39 this._subrects--;
40 }
41
42 return true;
43 }
44}

Callers

nothing calls this directly

Calls 5

rQwaitMethod · 0.80
rQshift32Method · 0.80
rQshiftBytesMethod · 0.80
fillRectMethod · 0.80
rQshift16Method · 0.80

Tested by

no test coverage detected