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_FXGE_DIB_DIB_INT_H_ | 7 #ifndef CORE_FXGE_DIB_DIB_INT_H_ |
8 #define CORE_FXGE_DIB_DIB_INT_H_ | 8 #define CORE_FXGE_DIB_DIB_INT_H_ |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 24 matching lines...) Expand all Loading... |
35 int base; | 35 int base; |
36 }; | 36 }; |
37 #define FPDF_HUGE_IMAGE_SIZE 60000000 | 37 #define FPDF_HUGE_IMAGE_SIZE 60000000 |
38 struct PixelWeight { | 38 struct PixelWeight { |
39 int m_SrcStart; | 39 int m_SrcStart; |
40 int m_SrcEnd; | 40 int m_SrcEnd; |
41 int m_Weights[1]; | 41 int m_Weights[1]; |
42 }; | 42 }; |
43 class CWeightTable { | 43 class CWeightTable { |
44 public: | 44 public: |
45 CWeightTable() { m_pWeightTables = NULL; } | 45 CWeightTable() { m_pWeightTables = nullptr; } |
46 ~CWeightTable() { | 46 ~CWeightTable() { |
47 FX_Free(m_pWeightTables); | 47 FX_Free(m_pWeightTables); |
48 m_pWeightTables = NULL; | 48 m_pWeightTables = nullptr; |
49 } | 49 } |
50 void Calc(int dest_len, | 50 void Calc(int dest_len, |
51 int dest_min, | 51 int dest_min, |
52 int dest_max, | 52 int dest_max, |
53 int src_len, | 53 int src_len, |
54 int src_min, | 54 int src_min, |
55 int src_max, | 55 int src_max, |
56 int flags); | 56 int flags); |
57 PixelWeight* GetPixelWeight(int pixel) { | 57 PixelWeight* GetPixelWeight(int pixel) { |
58 return (PixelWeight*)(m_pWeightTables + (pixel - m_DestMin) * m_ItemSize); | 58 return (PixelWeight*)(m_pWeightTables + (pixel - m_DestMin) * m_ItemSize); |
(...skipping 39 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_FXGE_DIB_DIB_INT_H_ | 107 #endif // CORE_FXGE_DIB_DIB_INT_H_ |
OLD | NEW |