summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_Image.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-03-14 13:35:12 -0400
committerDan Sinclair <dsinclair@chromium.org>2016-03-14 13:35:12 -0400
commit764ec513eecbebd12781bcc96ce81ed5e736ee92 (patch)
tree12763fde4be1f10ea1183d92185917b2b587e00b /core/fxcodec/jbig2/JBig2_Image.h
parent97da97662417085774f75c26e535c6fbe70266ae (diff)
downloadpdfium-764ec513eecbebd12781bcc96ce81ed5e736ee92.tar.xz
Move core/src/ up to core/.
This CL moves the core/src/ files up to core/ and fixes up the include guards, includes and build files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1800523005 .
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_Image.h')
-rw-r--r--core/fxcodec/jbig2/JBig2_Image.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/core/fxcodec/jbig2/JBig2_Image.h b/core/fxcodec/jbig2/JBig2_Image.h
new file mode 100644
index 0000000000..a18a95d596
--- /dev/null
+++ b/core/fxcodec/jbig2/JBig2_Image.h
@@ -0,0 +1,85 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef CORE_FXCODEC_JBIG2_JBIG2_IMAGE_H_
+#define CORE_FXCODEC_JBIG2_JBIG2_IMAGE_H_
+
+#include "core/fxcodec/jbig2/JBig2_Define.h"
+
+enum JBig2ComposeOp {
+ JBIG2_COMPOSE_OR = 0,
+ JBIG2_COMPOSE_AND = 1,
+ JBIG2_COMPOSE_XOR = 2,
+ JBIG2_COMPOSE_XNOR = 3,
+ JBIG2_COMPOSE_REPLACE = 4
+};
+
+struct FX_RECT;
+class CJBig2_Image {
+ public:
+ CJBig2_Image(int32_t w, int32_t h);
+
+ CJBig2_Image(int32_t w, int32_t h, int32_t stride, uint8_t* pBuf);
+
+ CJBig2_Image(const CJBig2_Image& im);
+
+ ~CJBig2_Image();
+
+ FX_BOOL getPixel(int32_t x, int32_t y);
+
+ int32_t setPixel(int32_t x, int32_t y, FX_BOOL v);
+
+ void copyLine(int32_t hTo, int32_t hFrom);
+
+ void fill(FX_BOOL v);
+
+ FX_BOOL composeTo(CJBig2_Image* pDst,
+ int32_t x,
+ int32_t y,
+ JBig2ComposeOp op);
+ FX_BOOL composeTo(CJBig2_Image* pDst,
+ int32_t x,
+ int32_t y,
+ JBig2ComposeOp op,
+ const FX_RECT* pSrcRect);
+
+ FX_BOOL composeTo_opt2(CJBig2_Image* pDst,
+ int32_t x,
+ int32_t y,
+ JBig2ComposeOp op);
+ FX_BOOL composeTo_opt2(CJBig2_Image* pDst,
+ int32_t x,
+ int32_t y,
+ JBig2ComposeOp op,
+ const FX_RECT* pSrcRect);
+
+ FX_BOOL composeFrom(int32_t x,
+ int32_t y,
+ CJBig2_Image* pSrc,
+ JBig2ComposeOp op);
+ FX_BOOL composeFrom(int32_t x,
+ int32_t y,
+ CJBig2_Image* pSrc,
+ JBig2ComposeOp op,
+ const FX_RECT* pSrcRect);
+
+ CJBig2_Image* subImage(int32_t x, int32_t y, int32_t w, int32_t h);
+
+ void expand(int32_t h, FX_BOOL v);
+
+ public:
+ int32_t m_nWidth;
+
+ int32_t m_nHeight;
+
+ int32_t m_nStride;
+
+ uint8_t* m_pData;
+
+ FX_BOOL m_bNeedFree;
+};
+
+#endif // CORE_FXCODEC_JBIG2_JBIG2_IMAGE_H_