Re: [qooxdoo-devel] Re size Image Depends on the System Resolution
Brought to you by:
ecker,
martinwittemann
|
From: Dioc <no...@ya...> - 2007-10-17 07:30:28
|
Hello Rajkumar, Using background images in qooxdoo is based on corresponding CSS capabilities. The current level of CSS (i.e. the level 2) does not support stretching of background image. Such option will be available only in CSS level 3 (see http://www.w3.org/TR/css3-background/) that is the working draft now. Using current capabilities of CSS you can only center the background image. To do this in your application, add the following line: bodyLayout.setStyleProperty("backgroundPosition", "center"); Best regards, Denis deepakraj wrote: > > Hi Denis, > Thanks for ur reply. > it works fine. But Image is not expanded automatically. > i.e., Empty spaces are available around the Image. > I need the Image ll be displayed and occupies the whole bodylayout > automatically.(When the resolution changes). > > Here is the code I've used... > bodyLayout = new qx.ui.layout.CanvasLayout(); > bodyLayout.setBackgroundImage("./hrimages/imaps.gif"); > > i just get the bodyLayout width and it's height by following... > var wid = (doc.getClientWidth() - 200); (doc is DocumentLayout...) > var hei = (doc.getClientHeight() - 29); > > and i've used qx.ui.basic.Image Class to Resize the Image specified in > setBackgroundImage method.. > var dyImg = new qx.ui.basic.Image("./hrimages/imaps.gif", wid, hei); > > now i just applied a method to bodyLayout like... > bodyLayout.setBackgroundImage(dyImg.getSource()); > > i might be wrong with this one. > How can i replace the old Image to Scaled Image(dyImg). > > Regards, > Rajkumar.S > > -- View this message in context: http://www.nabble.com/Resize-Image-Depends-on-the-System-Resolution-tf4627836.html#a13248464 Sent from the qooxdoo-devel mailing list archive at Nabble.com. |