From the bug report: > The top middle resource for windows gets a resourcewidth of 7 rather > than 6 when stretches=width.
So, I guess you're right about a floating point rounding issue. On 3/12/2010 11:46 PM, P T Withington wrote: > I'm curious as to why the existing code does not work. Mathematically they > should be equivalent. I can only suspect that the order of operations in the > existing code is causing a floating point quantization that causes the round > operation to go off. I suppose there is nothing wrong with using "brute > force", but I have to believe that it's more costly to smash the scaling of > the clip back and forth than to simply make the calculation. If you re-order > the expression to say: > > Math.round((mc._width * 100)/mc._xscale) > > does it work? > > Is the @devnote relevant to this problem? And if your change fixes this > problem, should the @devnote be deleted? > > On 2010-03-12, at 14:48, Max Carlson wrote: > > >> Change 20100308-maxcarlson-F by maxcarl...@bank on 2010-03-08 16:20:37 PST >> in /Users/maxcarlson/openlaszlo/trunk-clean >> for http://svn.openlaszlo.org/openlaszlo/trunk >> >> Summary: UPDATED AGAIN: Make resource size measurement more reliable in >> Flash 8 >> >> Bugs Fixed: LPP-8814 - resource gets wrong width when stretches equals width >> >> Technical Reviewer: ptw >> QA Reviewer: mdemmon >> >> Details: >> >> LaszloCanvas - Move swf8-only resourcetable from canvas to LzSprite, update >> comments, add __LZresolveDict test from LaszloView. >> >> LzSprite - Change resourcetable lookups to use LzSprite hash, add caching >> code (commented out for now) >> >> Exactly the same as before, just updating this change description to inlcude >> the bug number (oops) and update the tests to include those related to r7933. >> >> Unscale, measure, and reapply the scale to get the true size. >> >> Tests: IWFM, also see tests related to r7933: test/lpp-3726.lzx, >> test/lpp-4661.lzx and test/lpp-5372.lzx >> >> Files: >> M WEB-INF/lps/lfc/kernel/swf/LzSprite.as >> M WEB-INF/lps/lfc/views/LaszloCanvas.lzs >> >> Changeset: >> http://svn.openlaszlo.org/openlaszlo/patches/20100308-maxcarlson-F.tar >> >> _______________________________________________ >> Laszlo-reviews mailing list >> [email protected] >> http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews >> > > _______________________________________________ > Laszlo-reviews mailing list > [email protected] > http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews > > _______________________________________________ Laszlo-reviews mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
