mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-10-27 15:13:07 +00:00
GUACAMOLE-884: Note that the drawImage() functions accept anything implementing the CanvasImageSource interface, not just Image.
This commit is contained in:
@@ -512,11 +512,17 @@ Guacamole.Display = function() {
|
|||||||
* Draws the specified image at the given coordinates. The image specified
|
* Draws the specified image at the given coordinates. The image specified
|
||||||
* must already be loaded.
|
* must already be loaded.
|
||||||
*
|
*
|
||||||
* @param {Guacamole.Layer} layer The layer to draw upon.
|
* @param {Guacamole.Layer} layer
|
||||||
* @param {Number} x The destination X coordinate.
|
* The layer to draw upon.
|
||||||
* @param {Number} y The destination Y coordinate.
|
*
|
||||||
* @param {Image} image The image to draw. Note that this is an Image
|
* @param {Number} x
|
||||||
* object - not a URL.
|
* The destination X coordinate.
|
||||||
|
*
|
||||||
|
* @param {Number} y
|
||||||
|
* The destination Y coordinate.
|
||||||
|
*
|
||||||
|
* @param {CanvasImageSource} image
|
||||||
|
* The image to draw. Note that this not a URL.
|
||||||
*/
|
*/
|
||||||
this.drawImage = function(layer, x, y, image) {
|
this.drawImage = function(layer, x, y, image) {
|
||||||
scheduleTask(function __display_drawImage() {
|
scheduleTask(function __display_drawImage() {
|
||||||
|
|||||||
@@ -319,10 +319,14 @@ Guacamole.Layer = function(width, height) {
|
|||||||
* Draws the specified image at the given coordinates. The image specified
|
* Draws the specified image at the given coordinates. The image specified
|
||||||
* must already be loaded.
|
* must already be loaded.
|
||||||
*
|
*
|
||||||
* @param {Number} x The destination X coordinate.
|
* @param {Number} x
|
||||||
* @param {Number} y The destination Y coordinate.
|
* The destination X coordinate.
|
||||||
* @param {Image} image The image to draw. Note that this is an Image
|
*
|
||||||
* object - not a URL.
|
* @param {Number} y
|
||||||
|
* The destination Y coordinate.
|
||||||
|
*
|
||||||
|
* @param {CanvasImageSource} image
|
||||||
|
* The image to draw. Note that this is not a URL.
|
||||||
*/
|
*/
|
||||||
this.drawImage = function(x, y, image) {
|
this.drawImage = function(x, y, image) {
|
||||||
if (layer.autosize) fitRect(x, y, image.width, image.height);
|
if (layer.autosize) fitRect(x, y, image.width, image.height);
|
||||||
|
|||||||
Reference in New Issue
Block a user