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 _JBIG2_IMAGE_H_ | 7 #ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_IMAGE_H_ |
8 #define _JBIG2_IMAGE_H_ | 8 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_IMAGE_H_ |
9 | 9 |
10 #include "JBig2_Define.h" | 10 #include "JBig2_Define.h" |
11 | 11 |
12 enum JBig2ComposeOp { | 12 enum JBig2ComposeOp { |
13 JBIG2_COMPOSE_OR = 0, | 13 JBIG2_COMPOSE_OR = 0, |
14 JBIG2_COMPOSE_AND = 1, | 14 JBIG2_COMPOSE_AND = 1, |
15 JBIG2_COMPOSE_XOR = 2, | 15 JBIG2_COMPOSE_XOR = 2, |
16 JBIG2_COMPOSE_XNOR = 3, | 16 JBIG2_COMPOSE_XNOR = 3, |
17 JBIG2_COMPOSE_REPLACE = 4 | 17 JBIG2_COMPOSE_REPLACE = 4 |
18 }; | 18 }; |
19 | 19 |
20 struct FX_RECT; | 20 struct FX_RECT; |
21 class CJBig2_Image { | 21 class CJBig2_Image { |
22 public: | 22 public: |
23 CJBig2_Image(int32_t w, int32_t h); | 23 CJBig2_Image(int32_t w, int32_t h); |
24 | 24 |
25 CJBig2_Image(int32_t w, int32_t h, int32_t stride, uint8_t* pBuf); | 25 CJBig2_Image(int32_t w, int32_t h, int32_t stride, uint8_t* pBuf); |
26 | 26 |
27 CJBig2_Image(CJBig2_Image& im); | 27 CJBig2_Image(const CJBig2_Image& im); |
28 | 28 |
29 ~CJBig2_Image(); | 29 ~CJBig2_Image(); |
30 | 30 |
31 FX_BOOL getPixel(int32_t x, int32_t y); | 31 FX_BOOL getPixel(int32_t x, int32_t y); |
32 | 32 |
33 int32_t setPixel(int32_t x, int32_t y, FX_BOOL v); | 33 int32_t setPixel(int32_t x, int32_t y, FX_BOOL v); |
34 | 34 |
35 void copyLine(int32_t hTo, int32_t hFrom); | 35 void copyLine(int32_t hTo, int32_t hFrom); |
36 | 36 |
37 void fill(FX_BOOL v); | 37 void fill(FX_BOOL v); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 int32_t m_nWidth; | 74 int32_t m_nWidth; |
75 | 75 |
76 int32_t m_nHeight; | 76 int32_t m_nHeight; |
77 | 77 |
78 int32_t m_nStride; | 78 int32_t m_nStride; |
79 | 79 |
80 uint8_t* m_pData; | 80 uint8_t* m_pData; |
81 | 81 |
82 FX_BOOL m_bNeedFree; | 82 FX_BOOL m_bNeedFree; |
83 }; | 83 }; |
84 #endif | 84 |
| 85 #endif // CORE_SRC_FXCODEC_JBIG2_JBIG2_IMAGE_H_ |
OLD | NEW |