Hi Jim,

is this issue related to the (already fixed) bug #3273? 

        http://bugzilla.qooxdoo.org/show_bug.cgi?id=3273

cheers,
  Alex

On Friday March 5 2010 01:28:56 Jim Hunter wrote:
> Does anyone know of a bug in the scaling of images in 0.8.x? I created a
> simple control to view an image or any other type of file that a browser
> can display and when I was testing it in the Playground (1.0.1) it worked
> fine to scale the image. But when I put the control into my application
> (0.8.3) and tested it the scaling does nothing. The image stays the same
> size. It's as if it is just ignored. I know I need to move my app up to
> 1.01 but I have a release to get out and I can't spend the time on it
> right now.
> 
> basically, I have a routine that scales the image to either fit
> horizontally or vertically depending on the size of the image. Here is a
> snipet that does the scaling, anyone see any room for improvement to get
> it to work in 0.8.x?
> 
> this.page is a qx.ui.basic.Image
> this is a qx.ui.container.Scroll (also tried Composite with Canvas layout)
> 
> scaleMe : function(value)
> {
>   if (value)
>   {
>     var pWidth = this.getBounds()["width"] - 2;
>     var pHeight = this.getBounds()["height"] - 2;
>     var myWidth = this.page.getBounds()["width"];
>     var myHeight = this.page.getBounds()["height"];
>     // calculate the ratios
>     var rw = pWidth / myWidth;
>     var rh = pHeight / myHeight;
>     // determine which direction to scale to keep the aspect ratio
>     if (rw > rh)
>     {
>       this.page.setHeight(pHeight);
>       this.page.setWidth(Math.round(myWidth * rh));
>       this.page.setScale(true);
>     }
>     else if (rh > rw)
>     {
>       this.page.setWidth(pWidth);
>       this.page.setHeight(Math.round(myHeight * rh));
>       this.page.setScale(true);
>     }
>   }
>   else
>   {
>     this.page.setWidth(null);
>     this.page.setHeight(null);
>     this.page.setScale(false);
>   }
> }
> 
> this code works fine on 1.0.1

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to