summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_Image.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_Image.h')
-rw-r--r--core/fxcodec/jbig2/JBig2_Image.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/fxcodec/jbig2/JBig2_Image.h b/core/fxcodec/jbig2/JBig2_Image.h
index 3cf28b0643..b1b1489506 100644
--- a/core/fxcodec/jbig2/JBig2_Image.h
+++ b/core/fxcodec/jbig2/JBig2_Image.h
@@ -34,11 +34,14 @@ class CJBig2_Image {
int32_t width() const { return m_nWidth; }
int32_t height() const { return m_nHeight; }
int32_t stride() const { return m_nStride; }
+
uint8_t* data() const { return m_pData.Get(); }
int GetPixel(int32_t x, int32_t y) const;
void SetPixel(int32_t x, int32_t y, int bVal);
+ uint8_t* GetLine(int32_t y) const;
+ uint8_t* GetLineUnsafe(int32_t y) const { return data() + y * m_nStride; }
void CopyLine(int32_t hTo, int32_t hFrom);
void Fill(bool v);
@@ -74,9 +77,9 @@ class CJBig2_Image {
const FX_RECT& rtSrc);
MaybeOwned<uint8_t, FxFreeDeleter> m_pData;
- int32_t m_nWidth; // 1-bit pixels
- int32_t m_nHeight; // lines
- int32_t m_nStride; // bytes
+ int32_t m_nWidth = 0; // 1-bit pixels
+ int32_t m_nHeight = 0; // lines
+ int32_t m_nStride = 0; // bytes, must be multiple of 4.
};
#endif // CORE_FXCODEC_JBIG2_JBIG2_IMAGE_H_