On 1/7/2014 17:31, Ralf Habacker wrote:
Contains basic functions required by further patches
dlls/gdi32/dibdrv/graphics.c | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+)
That should be merged with a first patch that uses it.
done http://www.winehq.org/pipermail/wine-patches/2014-January/129505.html
+/*
- check matrix for condition
+*/ +BOOL hasRotatedAndSameScaledMatrixOnly(XFORM *xform) +{
- return xform->eM11 == xform->eM22 &&
-xform->eM21 == xform->eM12;
+}
Comment is telling nothing, 'xform' should be const probably.
done, see above link
- double determinant = 0;
- /* xform = xfrom-transposed * xform */
- xform->eM11 = sqrt( xform->eM11 * xform->eM11 + xform->eM21 *
xform->eM21 );
- xform->eM22 = sqrt( xform->eM12 * xform->eM12 + xform->eM22 *
xform->eM22 );
- xform->eM12 = 0;
- xform->eM21 = 0;
- xform->eDx = 0;
- xform->eDy = 0;
- if ( rotation_and_translation == NULL )
return TRUE;
- determinant = xform->eM11 * xform->eM22;
- inverse_matrix_scale.eM11 = xform->eM22 / determinant;
Is it possible to get 0 determinant here? Function never returns FALSE, so return value is useless.
fixed in above mentioned file.
Also please follow function and variable naming conventions used in this file.
done, found also better names for this functions.
Regards Ralf