Merge remote branch 'upstream/master'
Conflicts: include/canvas.js include/default_controls.js include/vnc.js
This commit is contained in:
+7
-16
@@ -8,10 +8,10 @@
|
||||
|
||||
"use strict";
|
||||
/*jslint white: false, bitwise: false */
|
||||
/*global window, $, Util */
|
||||
|
||||
Canvas_native = true;
|
||||
/*global window, $, Util, Base64 */
|
||||
|
||||
// Globals defined here
|
||||
var Canvas;
|
||||
|
||||
// Everything namespaced inside Canvas
|
||||
Canvas = {
|
||||
@@ -148,21 +148,12 @@ onMouseDisable: function (e) {
|
||||
|
||||
|
||||
init: function (id) {
|
||||
var c, imgTest, tval, i, curTest, curSave;
|
||||
var c, imgTest, tval, i, curDat, curSave;
|
||||
Util.Debug(">> Canvas.init");
|
||||
|
||||
Canvas.id = id;
|
||||
c = $(Canvas.id);
|
||||
|
||||
if (Canvas_native) {
|
||||
Util.Info("Using native canvas");
|
||||
// Use default Canvas functions
|
||||
} else {
|
||||
Util.Warn("Using excanvas canvas emulation");
|
||||
//G_vmlCanvasManager.init(c);
|
||||
//G_vmlCanvasManager.initElement(c);
|
||||
}
|
||||
|
||||
if (! c.getContext) { throw("No getContext method"); }
|
||||
Canvas.ctx = c.getContext('2d');
|
||||
|
||||
@@ -448,7 +439,7 @@ _rgbxImageData: function(x, y, width, height, arr, offset) {
|
||||
|
||||
// really slow fallback if we don't have imageData
|
||||
_rgbxImageFill: function(x, y, width, height, arr, offset) {
|
||||
var sx = 0, sy = 0;
|
||||
var i, j, sx = 0, sy = 0;
|
||||
for (i=0, j=offset; i < (width * height); i+=1, j+=4) {
|
||||
Canvas.fillRect(x+sx, y+sy, 1, 1, [arr[j+0], arr[j+1], arr[j+2]]);
|
||||
sx += 1;
|
||||
@@ -475,7 +466,7 @@ _cmapImageData: function(x, y, width, height, arr, offset) {
|
||||
},
|
||||
|
||||
_cmapImageFill: function(x, y, width, height, arr, offset) {
|
||||
var sx = 0, sy = 0;
|
||||
var i, j, sx = 0, sy = 0, cmap;
|
||||
cmap = Canvas.colourMap;
|
||||
for (i=0, j=offset; i < (width * height); i+=1, j+=1) {
|
||||
Canvas.fillRect(x+sx, y+sy, 1, 1, [arr[j]]);
|
||||
@@ -624,7 +615,7 @@ isCursor: function() {
|
||||
return Canvas.cursor_uri;
|
||||
},
|
||||
changeCursor: function(pixels, mask, hotx, hoty, w, h) {
|
||||
var cur = [], cmap, IHDRsz, ANDsz, XORsz, url, idx, x, y;
|
||||
var cur = [], cmap, rgb, IHDRsz, ANDsz, XORsz, url, idx, alpha, x, y;
|
||||
//Util.Debug(">> changeCursor, x: " + hotx + ", y: " + hoty + ", w: " + w + ", h: " + h);
|
||||
|
||||
if (!Canvas.cursor_uri) {
|
||||
|
||||
Reference in New Issue
Block a user