summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/BC_BinaryBitmap.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-08-04 13:00:21 -0700
committerNico Weber <thakis@chromium.org>2015-08-04 13:00:21 -0700
commit9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f (patch)
treec97037f398d714665aefccb6eb54d0969ad7030c /xfa/src/fxbarcode/BC_BinaryBitmap.cpp
parent780cee82236d1b3b0f9b01a22424e4b8ec9a6f12 (diff)
downloadpdfium-9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f.tar.xz
XFA: clang-format all pdfium code.
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \ xargs ../../buildtools/mac/clang-format -i Then manually merged https://codereview.chromium.org/1269223002/ See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none
Diffstat (limited to 'xfa/src/fxbarcode/BC_BinaryBitmap.cpp')
-rw-r--r--xfa/src/fxbarcode/BC_BinaryBitmap.cpp71
1 files changed, 32 insertions, 39 deletions
diff --git a/xfa/src/fxbarcode/BC_BinaryBitmap.cpp b/xfa/src/fxbarcode/BC_BinaryBitmap.cpp
index f37b49c478..1880670a8d 100644
--- a/xfa/src/fxbarcode/BC_BinaryBitmap.cpp
+++ b/xfa/src/fxbarcode/BC_BinaryBitmap.cpp
@@ -26,51 +26,44 @@
#include "BC_BinaryBitmap.h"
#include "common/BC_CommonBitMatrix.h"
#include "common/BC_CommonBitArray.h"
-CBC_BinaryBitmap::CBC_BinaryBitmap(CBC_Binarizer *binarizer): m_binarizer(binarizer), m_matrix(NULL)
-{
+CBC_BinaryBitmap::CBC_BinaryBitmap(CBC_Binarizer* binarizer)
+ : m_binarizer(binarizer), m_matrix(NULL) {}
+CBC_BinaryBitmap::~CBC_BinaryBitmap() {
+ if (m_matrix != NULL) {
+ delete m_matrix;
+ }
+ m_matrix = NULL;
}
-CBC_BinaryBitmap::~CBC_BinaryBitmap()
-{
- if (m_matrix != NULL) {
- delete m_matrix;
- }
- m_matrix = NULL;
+int32_t CBC_BinaryBitmap::GetHeight() {
+ return m_binarizer->GetLuminanceSource()->GetHeight();
}
-int32_t CBC_BinaryBitmap::GetHeight()
-{
- return m_binarizer->GetLuminanceSource()->GetHeight();
+int32_t CBC_BinaryBitmap::GetWidth() {
+ return m_binarizer->GetLuminanceSource()->GetWidth();
}
-int32_t CBC_BinaryBitmap::GetWidth()
-{
- return m_binarizer->GetLuminanceSource()->GetWidth();
+CBC_CommonBitMatrix* CBC_BinaryBitmap::GetMatrix(int32_t& e) {
+ if (m_matrix == NULL) {
+ m_matrix = m_binarizer->GetBlackMatrix(e);
+ BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ }
+ return m_matrix;
}
-CBC_CommonBitMatrix *CBC_BinaryBitmap::GetMatrix(int32_t &e)
-{
- if (m_matrix == NULL) {
- m_matrix = m_binarizer->GetBlackMatrix(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
- }
- return m_matrix;
+FX_BOOL CBC_BinaryBitmap::IsCropSupported() {
+ return m_binarizer->GetLuminanceSource()->IsCropSupported();
}
-FX_BOOL CBC_BinaryBitmap::IsCropSupported()
-{
- return m_binarizer->GetLuminanceSource()->IsCropSupported();
+FX_BOOL CBC_BinaryBitmap::IsRotateSupported() {
+ return m_binarizer->GetLuminanceSource()->IsRotateSupported();
}
-FX_BOOL CBC_BinaryBitmap::IsRotateSupported()
-{
- return m_binarizer->GetLuminanceSource()->IsRotateSupported();
+CBC_CommonBitArray* CBC_BinaryBitmap::GetBlackRow(int32_t y,
+ CBC_CommonBitArray* row,
+ int32_t& e) {
+ CBC_CommonBitArray* temp = m_binarizer->GetBlackRow(y, row, e);
+ BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ return temp;
}
-CBC_CommonBitArray *CBC_BinaryBitmap::GetBlackRow(int32_t y, CBC_CommonBitArray *row, int32_t &e)
-{
- CBC_CommonBitArray *temp = m_binarizer->GetBlackRow(y, row, e);
+CBC_CommonBitMatrix* CBC_BinaryBitmap::GetBlackMatrix(int32_t& e) {
+ if (m_matrix == NULL) {
+ m_matrix = m_binarizer->GetBlackMatrix(e);
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
- return temp;
-}
-CBC_CommonBitMatrix *CBC_BinaryBitmap::GetBlackMatrix(int32_t &e)
-{
- if (m_matrix == NULL) {
- m_matrix = m_binarizer->GetBlackMatrix(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
- }
- return m_matrix;
+ }
+ return m_matrix;
}