I think the property you want is unstretchedheight

On Apr 12, Mike Pence wrote:

> Here is what I need to do: I need to load some large images, then
> scale them down, proportionally, to fit within a part of the screen.
> This seems like awfully common need, so I am surprised that the answer
> is so difficult to find.  Maybe I am just not looking in the right
> places.
> 
> Here is what I have done: I went to this excellent site
> (http://secretartofscience.com/blog/?p=6) and tried the example that
> uses the aspect ratio property. No dice. I am on Laszlo 3.2. Here is
> as simple as I can make it:
> 
> <canvas bgcolor="black" width="800" >
>       <view name="demoview" clip="true" resource="2.jpg"
>               height="${unstretchedHeight}"
>               width="${unstretchedWidth}"
>       >
>       </view>
>  </canvas>
> 
> That works, of course. But as soon as I try to do any kind of math
> with those values, say:
> 
> ${unstretchedHeight * 0.2}
> 
> No image shows up. What am I missing?
> 
> Best,
> Mike Pence
> 
> _______________________________________________
> Laszlo-user mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
> 
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to