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_SRC_FXGE_DIB_DIB_INT_H_ | 7 #ifndef CORE_SRC_FXGE_DIB_DIB_INT_H_ |
8 #define CORE_SRC_FXGE_DIB_DIB_INT_H_ | 8 #define CORE_SRC_FXGE_DIB_DIB_INT_H_ |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
11 | 11 |
12 #include "core/include/fxcrt/fx_coordinates.h" | 12 #include "core/include/fxcrt/fx_coordinates.h" |
13 #include "core/include/fxge/fx_dib.h" | 13 #include "core/include/fxge/fx_dib.h" |
14 | 14 |
15 class IFX_ScanlineComposer; | 15 class IFX_ScanlineComposer; |
16 | 16 |
17 extern const int16_t SDP_Table[513]; | 17 extern const int16_t SDP_Table[513]; |
18 | 18 |
19 class CPDF_FixedMatrix { | 19 class CPDF_FixedMatrix { |
20 public: | 20 public: |
21 CPDF_FixedMatrix(const CFX_AffineMatrix& src, int bits) { | 21 CPDF_FixedMatrix(const CFX_Matrix& src, int bits) { |
22 base = 1 << bits; | 22 base = 1 << bits; |
23 a = FXSYS_round(src.a * base); | 23 a = FXSYS_round(src.a * base); |
24 b = FXSYS_round(src.b * base); | 24 b = FXSYS_round(src.b * base); |
25 c = FXSYS_round(src.c * base); | 25 c = FXSYS_round(src.c * base); |
26 d = FXSYS_round(src.d * base); | 26 d = FXSYS_round(src.d * base); |
27 e = FXSYS_round(src.e * base); | 27 e = FXSYS_round(src.e * base); |
28 f = FXSYS_round(src.f * base); | 28 f = FXSYS_round(src.f * base); |
29 } | 29 } |
30 inline void Transform(int x, int y, int& x1, int& y1) { | 30 inline void Transform(int x, int y, int& x1, int& y1) { |
31 x1 = (a * x + c * y + e + base / 2) / base; | 31 x1 = (a * x + c * y + e + base / 2) / base; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 int m_State; | 98 int m_State; |
99 }; | 99 }; |
100 | 100 |
101 FX_RECT FXDIB_SwapClipBox(FX_RECT& clip, | 101 FX_RECT FXDIB_SwapClipBox(FX_RECT& clip, |
102 int width, | 102 int width, |
103 int height, | 103 int height, |
104 FX_BOOL bFlipX, | 104 FX_BOOL bFlipX, |
105 FX_BOOL bFlipY); | 105 FX_BOOL bFlipY); |
106 | 106 |
107 #endif // CORE_SRC_FXGE_DIB_DIB_INT_H_ | 107 #endif // CORE_SRC_FXGE_DIB_DIB_INT_H_ |
OLD | NEW |