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 class CPDF_FixedMatrix | 10 class CPDF_FixedMatrix |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 FX_Free(m_pWeightTables); | 47 FX_Free(m_pWeightTables); |
48 } | 48 } |
49 m_pWeightTables = NULL; | 49 m_pWeightTables = NULL; |
50 } | 50 } |
51 void Calc(int dest_len, int dest_min, int dest_max, i
nt src_len, int src_min, int src_max, int flags); | 51 void Calc(int dest_len, int dest_min, int dest_max, i
nt src_len, int src_min, int src_max, int flags); |
52 PixelWeight* GetPixelWeight(int pixel) | 52 PixelWeight* GetPixelWeight(int pixel) |
53 { | 53 { |
54 return (PixelWeight*)(m_pWeightTables + (pixel - m_DestMin) * m_ItemSize
); | 54 return (PixelWeight*)(m_pWeightTables + (pixel - m_DestMin) * m_ItemSize
); |
55 } | 55 } |
56 int m_DestMin, m_ItemSize; | 56 int m_DestMin, m_ItemSize; |
57 FX_LPBYTE» » m_pWeightTables; | 57 uint8_t*» » m_pWeightTables; |
58 }; | 58 }; |
59 class CStretchEngine | 59 class CStretchEngine |
60 { | 60 { |
61 public: | 61 public: |
62 CStretchEngine(IFX_ScanlineComposer* pDestBitmap, FXDIB_Format dest_format, | 62 CStretchEngine(IFX_ScanlineComposer* pDestBitmap, FXDIB_Format dest_format, |
63 int dest_width, int dest_height, const FX_RECT& clip_rect, | 63 int dest_width, int dest_height, const FX_RECT& clip_rect, |
64 const CFX_DIBSource* pSrcBitmap, int flags); | 64 const CFX_DIBSource* pSrcBitmap, int flags); |
65 ~CStretchEngine(); | 65 ~CStretchEngine(); |
66 FX_BOOL Continue(IFX_Pause* pPause); | 66 FX_BOOL Continue(IFX_Pause* pPause); |
67 public: | 67 public: |
68 FXDIB_Format m_DestFormat; | 68 FXDIB_Format m_DestFormat; |
69 int m_DestBpp, m_SrcBpp, m_bHasAlpha; | 69 int m_DestBpp, m_SrcBpp, m_bHasAlpha; |
70 IFX_ScanlineComposer* m_pDestBitmap; | 70 IFX_ScanlineComposer* m_pDestBitmap; |
71 int m_DestWidth, m_DestHeight; | 71 int m_DestWidth, m_DestHeight; |
72 FX_RECT m_DestClip; | 72 FX_RECT m_DestClip; |
73 FX_LPBYTE» m_pDestScanline; | 73 uint8_t*» m_pDestScanline; |
74 FX_LPBYTE m_pDestMaskScanline; | 74 uint8_t* m_pDestMaskScanline; |
75 FX_RECT m_SrcClip; | 75 FX_RECT m_SrcClip; |
76 const CFX_DIBSource* m_pSource; | 76 const CFX_DIBSource* m_pSource; |
77 FX_DWORD* m_pSrcPalette; | 77 FX_DWORD* m_pSrcPalette; |
78 int m_SrcWidth, m_SrcHeight; | 78 int m_SrcWidth, m_SrcHeight; |
79 int m_SrcPitch, m_InterPitch; | 79 int m_SrcPitch, m_InterPitch; |
80 int m_ExtraMaskPitch; | 80 int m_ExtraMaskPitch; |
81 unsigned char* m_pInterBuf; | 81 unsigned char* m_pInterBuf; |
82 unsigned char* m_pExtraAlphaBuf; | 82 unsigned char* m_pExtraAlphaBuf; |
83 int m_TransMethod; | 83 int m_TransMethod; |
84 int m_Flags; | 84 int m_Flags; |
85 CWeightTable m_WeightTable; | 85 CWeightTable m_WeightTable; |
86 int m_CurRow; | 86 int m_CurRow; |
87 FX_BOOL StartStretchHorz(); | 87 FX_BOOL StartStretchHorz(); |
88 FX_BOOL ContinueStretchHorz(IFX_Pause* pPause); | 88 FX_BOOL ContinueStretchHorz(IFX_Pause* pPause); |
89 void StretchVert(); | 89 void StretchVert(); |
90 int m_State; | 90 int m_State; |
91 }; | 91 }; |
92 | 92 |
93 #endif // CORE_SRC_FXGE_DIB_DIB_INT_H_ | 93 #endif // CORE_SRC_FXGE_DIB_DIB_INT_H_ |
OLD | NEW |