| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_INCLUDE_FXCRT_FX_COORDINATES_H_ | 7 #ifndef CORE_INCLUDE_FXCRT_FX_COORDINATES_H_ |
| 8 #define CORE_INCLUDE_FXCRT_FX_COORDINATES_H_ | 8 #define CORE_INCLUDE_FXCRT_FX_COORDINATES_H_ |
| 9 | 9 |
| 10 #include "fx_basic.h" | 10 #include "fx_basic.h" |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 FX_FLOAT left; | 600 FX_FLOAT left; |
| 601 | 601 |
| 602 FX_FLOAT right; | 602 FX_FLOAT right; |
| 603 | 603 |
| 604 FX_FLOAT bottom; | 604 FX_FLOAT bottom; |
| 605 | 605 |
| 606 FX_FLOAT top; | 606 FX_FLOAT top; |
| 607 }; | 607 }; |
| 608 class CFX_Matrix { | 608 class CFX_Matrix { |
| 609 public: | 609 public: |
| 610 CFX_Matrix() { | 610 CFX_Matrix() { SetIdentity(); } |
| 611 a = d = 1; | |
| 612 b = c = e = f = 0; | |
| 613 } | |
| 614 | 611 |
| 615 CFX_Matrix(FX_FLOAT a1, | 612 CFX_Matrix(FX_FLOAT a1, |
| 616 FX_FLOAT b1, | 613 FX_FLOAT b1, |
| 617 FX_FLOAT c1, | 614 FX_FLOAT c1, |
| 618 FX_FLOAT d1, | 615 FX_FLOAT d1, |
| 619 FX_FLOAT e1, | 616 FX_FLOAT e1, |
| 620 FX_FLOAT f1) { | 617 FX_FLOAT f1) { |
| 621 a = a1; | 618 a = a1; |
| 622 b = b1; | 619 b = b1; |
| 623 c = c1; | 620 c = c1; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 641 | 638 |
| 642 void SetReverse(const CFX_Matrix& m); | 639 void SetReverse(const CFX_Matrix& m); |
| 643 | 640 |
| 644 void Concat(FX_FLOAT a, | 641 void Concat(FX_FLOAT a, |
| 645 FX_FLOAT b, | 642 FX_FLOAT b, |
| 646 FX_FLOAT c, | 643 FX_FLOAT c, |
| 647 FX_FLOAT d, | 644 FX_FLOAT d, |
| 648 FX_FLOAT e, | 645 FX_FLOAT e, |
| 649 FX_FLOAT f, | 646 FX_FLOAT f, |
| 650 FX_BOOL bPrepended = FALSE); | 647 FX_BOOL bPrepended = FALSE); |
| 651 | |
| 652 void Concat(const CFX_Matrix& m, FX_BOOL bPrepended = FALSE); | 648 void Concat(const CFX_Matrix& m, FX_BOOL bPrepended = FALSE); |
| 653 | |
| 654 void ConcatInverse(const CFX_Matrix& m, FX_BOOL bPrepended = FALSE); | 649 void ConcatInverse(const CFX_Matrix& m, FX_BOOL bPrepended = FALSE); |
| 655 void Reset() { SetIdentity(); } | |
| 656 | 650 |
| 657 void Copy(const CFX_Matrix& m) { *this = m; } | 651 void Copy(const CFX_Matrix& m) { *this = m; } |
| 658 | 652 |
| 659 FX_BOOL IsIdentity() const { | 653 FX_BOOL IsIdentity() const { |
| 660 return a == 1 && b == 0 && c == 0 && d == 1 && e == 0 && f == 0; | 654 return a == 1 && b == 0 && c == 0 && d == 1 && e == 0 && f == 0; |
| 661 } | 655 } |
| 662 FX_BOOL IsInvertible() const; | 656 FX_BOOL IsInvertible() const; |
| 663 | 657 |
| 664 FX_BOOL Is90Rotated() const; | 658 FX_BOOL Is90Rotated() const; |
| 665 | 659 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 FX_FLOAT a; | 737 FX_FLOAT a; |
| 744 FX_FLOAT b; | 738 FX_FLOAT b; |
| 745 FX_FLOAT c; | 739 FX_FLOAT c; |
| 746 FX_FLOAT d; | 740 FX_FLOAT d; |
| 747 FX_FLOAT e; | 741 FX_FLOAT e; |
| 748 FX_FLOAT f; | 742 FX_FLOAT f; |
| 749 }; | 743 }; |
| 750 #define CFX_AffineMatrix CFX_Matrix | 744 #define CFX_AffineMatrix CFX_Matrix |
| 751 | 745 |
| 752 #endif // CORE_INCLUDE_FXCRT_FX_COORDINATES_H_ | 746 #endif // CORE_INCLUDE_FXCRT_FX_COORDINATES_H_ |
| OLD | NEW |