Not sure if this helps, but here is link of a piece of code that draws a image 
on a q.ui.embed.canvas (however this a plain Image object, not 
qx.ui.basic.image).

https://github.com/jbaron/cats/blob/master/src/cats/gui/editor/imageEditor.ts

The code is in TypeScript, but should be easy to understand and directly 
translate  into Javascript. The two main methods are:


       private loadImage(url) {
            var image = new Image();
            image.onload = () => { this.drawImage(image); };
            image.src = url;
        }

   
        private drawImage(image) {
            this.resizeIfRequired(image);
            this.canvas.getContext2d().drawImage(image,
                this.canvas.getCanvasWidth() / 2 - image.width / 2,
                this.canvas.getCanvasHeight() / 2 - image.height / 2
                );
        }



On 14 Oct 2014, at 22:50, Christian Krüger <c.kruege...@web.de> wrote:

> ...'on' the 2D context of a qx.ui.embed.canvas?
> 
> Tried several ways to retreive internals and use the 'drawImage()' 
> function but had no success.
> 
> BR
> I.
> 
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://p.sf.net/sfu/Zoho
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to