| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkMatrix.h" | 8 #include "SkMatrix.h" |
| 9 #include "SkFloatBits.h" | 9 #include "SkFloatBits.h" |
| 10 #include "SkString.h" | 10 #include "SkString.h" |
| (...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1759 sin1 *= reciplen; | 1759 sin1 *= reciplen; |
| 1760 | 1760 |
| 1761 // rotation 2 is composition of Q and U | 1761 // rotation 2 is composition of Q and U |
| 1762 cos2 = cos1*cosQ - sin1*sinQ; | 1762 cos2 = cos1*cosQ - sin1*sinQ; |
| 1763 sin2 = sin1*cosQ + cos1*sinQ; | 1763 sin2 = sin1*cosQ + cos1*sinQ; |
| 1764 | 1764 |
| 1765 // rotation 1 is U^T | 1765 // rotation 1 is U^T |
| 1766 sin1 = -sin1; | 1766 sin1 = -sin1; |
| 1767 } | 1767 } |
| 1768 | 1768 |
| 1769 if (NULL != scale) { | 1769 if (scale) { |
| 1770 scale->fX = SkDoubleToScalar(w1); | 1770 scale->fX = SkDoubleToScalar(w1); |
| 1771 scale->fY = SkDoubleToScalar(w2); | 1771 scale->fY = SkDoubleToScalar(w2); |
| 1772 } | 1772 } |
| 1773 if (NULL != rotation1) { | 1773 if (rotation1) { |
| 1774 rotation1->fX = cos1; | 1774 rotation1->fX = cos1; |
| 1775 rotation1->fY = sin1; | 1775 rotation1->fY = sin1; |
| 1776 } | 1776 } |
| 1777 if (NULL != rotation2) { | 1777 if (rotation2) { |
| 1778 rotation2->fX = cos2; | 1778 rotation2->fX = cos2; |
| 1779 rotation2->fY = sin2; | 1779 rotation2->fY = sin2; |
| 1780 } | 1780 } |
| 1781 | 1781 |
| 1782 return true; | 1782 return true; |
| 1783 } | 1783 } |
| OLD | NEW |