On Feb 2, 2007, at 4:28 PM, Ralph Thomas wrote:
> Hi List,
>
> Is there a reasonable way to extend Eve such that a view can specify
> an aspect ratio that it must be placed at (if it was a video or
> picture, for example). I'm aware of the twopass layout, but that only
> solves the case where the ratio is wider than it is taller.
No - it simply biases the width first to the hight - you can use the
same two passes to preserve the aspect ratio-
Think about it this way - given something that is 10 unites wide with
an aspect ration of 1:2 how tall is it? What if the aspect ration is
2:1 - now how tall?
>
> Imagine that such a ratio constrained view is center aligned
> horizontally and filling vertically (and imagine that it's tiny, and
> being scaled up because it's filling vertically). The view won't know
> what width to return to Eve until it knows the height that's
> available.
Simply because you are asked to fill a space horizontally doesn't
mean you need to use the space - you can place limits on the vertical
calculation given the aspect ration and horizontal calculation - this
may then adjust the actual width - and you'll have extra white space
- but this is white space you would have anyway.
>
> The only easy way I can think of "solving" this problem is by
> solving vertical layout first, adjusting horizontal and the solving
> horizontal layout when a layout has a view that's constrained like
> this. Clearly this breaks down when there are two views that not both
> constrained in the same way (and probably some platform's paragraph
> layout APIs won't give you width based on height, breaking word-wrap
> in labels). Is there another (reasonable) way to extend Eve to support
> views with fixed aspect ratios?
>
> Thanks!
> Ralph
>
> ----------------------------------------------------------------------
> ---
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Adobe-source-devel mailing list
> Ado...@li...
> https://lists.sourceforge.net/lists/listinfo/adobe-source-devel
|