Commit 35d7574b authored by Joel Martin's avatar Joel Martin

Merge commit 'd38db74a'

Conflicts:
	README.md
parents 0c4f4b59 d38db74a
......@@ -26,6 +26,7 @@ their products including: [Ganeti Web Manager](http://code.osuosl.org/projects/g
* Easy site integration and theming (3 example themes included)
* Licensed under the [LGPLv3](http://www.gnu.org/licenses/lgpl.html)
* Support for tight encoding (contributed by Mercuri.ca)
### Screenshots
......
......@@ -20,7 +20,7 @@ var that = {}, // Public API methods
c_forceCanvas = false,
// Predefine function variables (jslint)
imageDataGet, bgrxImageData, cmapImageData,
imageDataGet, rgbImageData, bgrxImageData, cmapImageData,
setFillColor, rescale,
// The full frame buffer (logical canvas) size
......@@ -497,6 +497,26 @@ that.finishTile = function() {
// else: No-op, if not prefer_js then already done by setSubTile
};
rgbImageData = function(x, y, width, height, arr, offset) {
var img, i, j, data, v = viewport;
/*
if ((x - v.x >= v.w) || (y - v.y >= v.h) ||
(x - v.x + width < 0) || (y - v.y + height < 0)) {
// Skipping because outside of viewport
return;
}
*/
img = c_ctx.createImageData(width, height);
data = img.data;
for (i=0, j=offset; i < (width * height * 4); i=i+4, j=j+3) {
data[i ] = arr[j ];
data[i + 1] = arr[j + 1];
data[i + 2] = arr[j + 2];
data[i + 3] = 255; // Set Alpha
}
c_ctx.putImageData(img, x - v.x, y - v.y);
};
bgrxImageData = function(x, y, width, height, arr, offset) {
var img, i, j, data, v = viewport;
/*
......@@ -540,6 +560,15 @@ that.blitImage = function(x, y, width, height, arr, offset) {
}
};
that.blitRgbImage = function(x, y, width, height, arr, offset) {
if (conf.true_color) {
rgbImageData(x, y, width, height, arr, offset);
} else {
// prolly wrong...
cmapImageData(x, y, width, height, arr, offset);
}
};
that.blitStringImage = function(str, x, y) {
var img = new Image();
img.onload = function () {
......
This diff is collapsed.
This diff is collapsed.
......@@ -32,10 +32,13 @@ function get_INCLUDE_URI() {
extra += start + "webutil.js" + end;
extra += start + "base64.js" + end;
extra += start + "websock.js" + end;
// extra += start + "socketio.js" + end;
extra += start + "des.js" + end;
extra += start + "input.js" + end;
extra += start + "display.js" + end;
extra += start + "blowfish.js" + end;
extra += start + "rfb.js" + end;
extra += start + "jsunzip.js" + end;
document.write(extra);
}());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment