Commit 99dc56ea authored by claes's avatar claes

Bugfix in revert for null size objects

parent 3c0f2925
......@@ -142,7 +142,7 @@ double GlowTransform::y( GlowTransform *t, double x1, double y1)
return tmp.y( x1, y1);
}
void GlowTransform::reverse( double x, double y, double *rx, double *ry)
bool GlowTransform::reverse( double x, double y, double *rx, double *ry)
{
if ( a11 == 0 || ( a12 * a21 - a11 * a22) == 0)
{
......@@ -150,15 +150,17 @@ void GlowTransform::reverse( double x, double y, double *rx, double *ry)
{
*ry = (x - a13) / a12;
*rx = (y - a23) / a21;
return true;
}
else
{
*ry = *rx = 0;
return false;
}
return;
}
*ry = ( a11 * ( a23 - y) - a21 * ( a13 - x)) / ( a12 * a21 - a11 * a22);
*rx = ( x - a12 * *ry - a13) / a11;
return true;
}
double GlowTransform::vertical_scale( GlowTransform *t)
......
......@@ -21,7 +21,7 @@ class GlowTransform {
double y( double x1, double y1);
double x( GlowTransform *t, double x1, double y1);
double y( GlowTransform *t, double x1, double y1);
void reverse( double x, double y, double *rx, double *ry);
bool reverse( double x, double y, double *rx, double *ry);
void save( ofstream& fp, glow_eSaveMode mode);
void open( ifstream& fp);
double rot( GlowTransform *t) { return t->rotation + rotation;};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment