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_FXCODEC_JBIG2_JBIG2_IMAGE_H_ | 7 #ifndef CORE_FXCODEC_JBIG2_JBIG2_IMAGE_H_ |
8 #define CORE_FXCODEC_JBIG2_JBIG2_IMAGE_H_ | 8 #define CORE_FXCODEC_JBIG2_JBIG2_IMAGE_H_ |
9 | 9 |
10 #include "core/fxcodec/jbig2/JBig2_Define.h" | 10 #include "core/fxcodec/jbig2/JBig2_Define.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 ~CJBig2_Image(); | 27 ~CJBig2_Image(); |
28 | 28 |
29 int32_t width() const { return m_nWidth; } | 29 int32_t width() const { return m_nWidth; } |
30 int32_t height() const { return m_nHeight; } | 30 int32_t height() const { return m_nHeight; } |
31 int32_t stride() const { return m_nStride; } | 31 int32_t stride() const { return m_nStride; } |
32 | 32 |
33 int getPixel(int32_t x, int32_t y); | 33 int getPixel(int32_t x, int32_t y); |
34 int32_t setPixel(int32_t x, int32_t y, int bVal); | 34 int32_t setPixel(int32_t x, int32_t y, int bVal); |
35 | 35 |
36 void copyLine(int32_t hTo, int32_t hFrom); | 36 void copyLine(int32_t hTo, int32_t hFrom); |
37 void fill(FX_BOOL v); | 37 void fill(bool v); |
38 | 38 |
39 FX_BOOL composeTo(CJBig2_Image* pDst, | 39 bool composeTo(CJBig2_Image* pDst, int32_t x, int32_t y, JBig2ComposeOp op); |
40 int32_t x, | 40 bool composeTo(CJBig2_Image* pDst, |
41 int32_t y, | 41 int32_t x, |
42 JBig2ComposeOp op); | 42 int32_t y, |
43 FX_BOOL composeTo(CJBig2_Image* pDst, | 43 JBig2ComposeOp op, |
44 int32_t x, | 44 const FX_RECT* pSrcRect); |
45 int32_t y, | |
46 JBig2ComposeOp op, | |
47 const FX_RECT* pSrcRect); | |
48 | 45 |
49 FX_BOOL composeTo_opt2(CJBig2_Image* pDst, | 46 bool composeTo_opt2(CJBig2_Image* pDst, |
50 int32_t x, | 47 int32_t x, |
51 int32_t y, | |
52 JBig2ComposeOp op); | |
53 FX_BOOL composeTo_opt2(CJBig2_Image* pDst, | |
54 int32_t x, | |
55 int32_t y, | |
56 JBig2ComposeOp op, | |
57 const FX_RECT* pSrcRect); | |
58 | |
59 FX_BOOL composeFrom(int32_t x, | |
60 int32_t y, | 48 int32_t y, |
61 CJBig2_Image* pSrc, | |
62 JBig2ComposeOp op); | 49 JBig2ComposeOp op); |
63 FX_BOOL composeFrom(int32_t x, | 50 bool composeTo_opt2(CJBig2_Image* pDst, |
| 51 int32_t x, |
64 int32_t y, | 52 int32_t y, |
65 CJBig2_Image* pSrc, | |
66 JBig2ComposeOp op, | 53 JBig2ComposeOp op, |
67 const FX_RECT* pSrcRect); | 54 const FX_RECT* pSrcRect); |
68 | 55 |
| 56 bool composeFrom(int32_t x, int32_t y, CJBig2_Image* pSrc, JBig2ComposeOp op); |
| 57 bool composeFrom(int32_t x, |
| 58 int32_t y, |
| 59 CJBig2_Image* pSrc, |
| 60 JBig2ComposeOp op, |
| 61 const FX_RECT* pSrcRect); |
| 62 |
69 CJBig2_Image* subImage(int32_t x, int32_t y, int32_t w, int32_t h); | 63 CJBig2_Image* subImage(int32_t x, int32_t y, int32_t w, int32_t h); |
70 void expand(int32_t h, FX_BOOL v); | 64 void expand(int32_t h, bool v); |
71 | 65 |
72 uint8_t* m_pData; | 66 uint8_t* m_pData; |
73 | 67 |
74 private: | 68 private: |
75 int32_t m_nWidth; // 1-bit pixels | 69 int32_t m_nWidth; // 1-bit pixels |
76 int32_t m_nHeight; // lines | 70 int32_t m_nHeight; // lines |
77 int32_t m_nStride; // bytes | 71 int32_t m_nStride; // bytes |
78 bool m_bOwnsBuffer; | 72 bool m_bOwnsBuffer; |
79 }; | 73 }; |
80 | 74 |
81 #endif // CORE_FXCODEC_JBIG2_JBIG2_IMAGE_H_ | 75 #endif // CORE_FXCODEC_JBIG2_JBIG2_IMAGE_H_ |
OLD | NEW |