mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +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
|
||||
* must already be loaded.
|
||||
*
|
||||
* @param {Guacamole.Layer} layer The layer to draw upon.
|
||||
* @param {Number} x The destination X coordinate.
|
||||
* @param {Number} y The destination Y coordinate.
|
||||
* @param {Image} image The image to draw. Note that this is an Image
|
||||
* object - not a URL.
|
||||
* @param {Guacamole.Layer} layer
|
||||
* The layer to draw upon.
|
||||
*
|
||||
* @param {Number} x
|
||||
* 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) {
|
||||
scheduleTask(function __display_drawImage() {
|
||||
|
@@ -319,10 +319,14 @@ Guacamole.Layer = function(width, height) {
|
||||
* Draws the specified image at the given coordinates. The image specified
|
||||
* must already be loaded.
|
||||
*
|
||||
* @param {Number} x The destination X coordinate.
|
||||
* @param {Number} y The destination Y coordinate.
|
||||
* @param {Image} image The image to draw. Note that this is an Image
|
||||
* object - not a URL.
|
||||
* @param {Number} x
|
||||
* The destination X coordinate.
|
||||
*
|
||||
* @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) {
|
||||
if (layer.autosize) fitRect(x, y, image.width, image.height);
|
||||
|
Reference in New Issue
Block a user