[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-dev] gravity.swf automated testing
From: |
strk |
Subject: |
Re: [Gnash-dev] gravity.swf automated testing |
Date: |
Thu, 2 Nov 2006 21:45:00 +0100 |
On Thu, Nov 02, 2006 at 09:36:08PM +0100, Udo Giacomozzi wrote:
> Hello strk,
>
> Thursday, November 2, 2006, 9:27:00 PM, you wrote:
>
> s> mmm... the edit_text_character keeps that as a tu_string
> s> and takes it as a char*.
> s> sprite_instance::set_member calls as_value.to_string()
> s> to pass it.
> s> Maybe I should try comparing tu_strings then...
>
> When you look in sprite_instance.cpp::get_member() you'll find:
>
> case M_XSCALE:
> {
> matrix m = get_matrix();
> float xscale = m.get_x_scale();
> val->set_double(xscale * 100); // result in percent
> return true;
> }
>
> When writing _xscale, the matrix is updated, when reading, the matrix
> is analyzed. So, the value is converted before it is stored. The
> precision that's lost when converting adds up each time you change the
> size.
>
> It's not very nice, but I'd not say it's a problem...
Yes, but the automated test *was* callin ::get_member(), so the
resulting val should be the *exactly* same you get when fetching
_xscale from ActionScript, that's my point. I'm not particularly
interested in obtaining a rounded number, just wondering why
you *do* get a rounded number from ActionScript while I'm not
from the automated testcase. My best bet is the
as_value::to_string() [C string] => tu_string
conversion that happens when assigning that variable to
the textfield -- you'd be calling
sprite_instance::set_member(<name_of_textfield>, <your_variable>)
--strk;
- [Gnash-dev] gravity.swf automated testing, strk, 2006/11/02
- Re: [Gnash-dev] gravity.swf automated testing, Udo Giacomozzi, 2006/11/02
- Re[2]: [Gnash-dev] gravity.swf automated testing, Udo Giacomozzi, 2006/11/02
- Re: [Gnash-dev] gravity.swf automated testing, strk, 2006/11/02
- Re[2]: [Gnash-dev] gravity.swf automated testing, Udo Giacomozzi, 2006/11/02
- Re: [Gnash-dev] gravity.swf automated testing, strk, 2006/11/02
- Re[2]: [Gnash-dev] gravity.swf automated testing, Udo Giacomozzi, 2006/11/02
- Re: [Gnash-dev] gravity.swf automated testing,
strk <=
- Re[2]: [Gnash-dev] gravity.swf automated testing, Udo Giacomozzi, 2006/11/03