From 1fea2cf4076569fdac211055d8b72575f068c339 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 14 Feb 2012 22:58:52 -0800 Subject: [PATCH] Added pre-defined channel mask constants. Setting cursor layer to Guacamole.Layer.SRC. --- src/main/resources/guacamole.js | 5 +++ src/main/resources/layer.js | 70 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) diff --git a/src/main/resources/guacamole.js b/src/main/resources/guacamole.js index 9461978..6c650ac 100644 --- a/src/main/resources/guacamole.js +++ b/src/main/resources/guacamole.js @@ -75,6 +75,8 @@ Guacamole.Client = function(tunnel) { // Create default layer var default_layer_container = new Guacamole.Client.LayerContainer(displayWidth, displayHeight); + + // Position default layer var default_layer_container_element = default_layer_container.getElement(); default_layer_container_element.style.position = "absolute"; default_layer_container_element.style.left = "0px"; @@ -82,6 +84,9 @@ Guacamole.Client = function(tunnel) { // Create cursor layer var cursor = new Guacamole.Client.LayerContainer(0, 0); + cursor.getLayer().setChannelMask(Guacamole.Layer.SRC); + + // Position cursor layer var cursor_element = cursor.getElement(); cursor_element.style.position = "absolute"; cursor_element.style.left = "0px"; diff --git a/src/main/resources/layer.js b/src/main/resources/layer.js index ee986a5..fe93e2b 100644 --- a/src/main/resources/layer.js +++ b/src/main/resources/layer.js @@ -39,6 +39,76 @@ var Guacamole = Guacamole || {}; /** + * Channel mask for the composite operation "rout". + */ +Guacamole.Layer.ROUT = 0x2; + +/** + * Channel mask for the composite operation "atop". + */ +Guacamole.Layer.ATOP = 0x6; + +/** + * Channel mask for the composite operation "xor". + */ +Guacamole.Layer.XOR = 0xA; + +/** + * Channel mask for the composite operation "rover". + */ +Guacamole.Layer.ROVER = 0xB; + +/** + * Channel mask for the composite operation "over". + */ +Guacamole.Layer.OVER = 0xE; + +/** + * Channel mask for the composite operation "plus". + */ +Guacamole.Layer.PLUS = 0xF; + +/** + * Channel mask for the composite operation "rin". + * Beware that WebKit-based browsers may leave the contents of the destionation + * layer where the source layer is transparent, despite the definition of this + * operation. + */ +Guacamole.Layer.RIN = 0x1; + +/** + * Channel mask for the composite operation "in". + * Beware that WebKit-based browsers may leave the contents of the destionation + * layer where the source layer is transparent, despite the definition of this + * operation. + */ +Guacamole.Layer.IN = 0x4; + +/** + * Channel mask for the composite operation "out". + * Beware that WebKit-based browsers may leave the contents of the destionation + * layer where the source layer is transparent, despite the definition of this + * operation. + */ +Guacamole.Layer.OUT = 0x8; + +/** + * Channel mask for the composite operation "ratop". + * Beware that WebKit-based browsers may leave the contents of the destionation + * layer where the source layer is transparent, despite the definition of this + * operation. + */ +Guacamole.Layer.RATOP = 0x9; + +/** + * Channel mask for the composite operation "src". + * Beware that WebKit-based browsers may leave the contents of the destionation + * layer where the source layer is transparent, despite the definition of this + * operation. + */ +Guacamole.Layer.SRC = 0xC; + +/** * Abstract ordered drawing surface. Each Layer contains a canvas element and * provides simple drawing instructions for drawing to that canvas element, * however unlike the canvas element itself, drawing operations on a Layer are -- 1.7.10.4