On Wed, Oct 11, 2006 at 09:50:54AM +0200, strk wrote:
> On Tue, Oct 10, 2006 at 08:05:10PM +0100, Martin Guy wrote:
> > The values on the diagonal from top left to bottom right *do* scale
> > the image if all the other values are 0, but so do the values at
> > [0][1] and [1][0] as well as applying a rotation. I've called them
> > x_dep_y and y_dep_x because they are how the output x coordinate
> > depends on the input y coordinate and vice versa.
>
> Ok, so taking a *single* value out of the matrix is surely
> wrong in all our cases, correct ?
Talking about the original question, would it be correct
to change the code like this:
virtual float get_height() const
{
matrix m = get_world_matrix();
- float h = m_def->get_height_local() * m.m_[1][1];
+ float h = m_def->get_height_local() * m.get_y_scale();
return h;
}
matrix::get_y_scale is implemented like:
return sqrtf(m_[1][1] * m_[1][1] + m_[1][0] * m_[1][0]);
BTW, matrix::get_x_scale contains an additional check:
// Are we turned inside out?
if (get_determinant() < 0.f)
{
scale = -scale;
}
Should it also apply to get_y_scale ?
--strk;
_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev