From b048f791a15f2da781a01eba5b09eb9d389f9c11 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 4 Aug 2015 12:19:10 -0700 Subject: clang-format all pdfium code. No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163' | \ xargs ../../buildtools/mac/clang-format -i See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1265503005 . --- core/src/fxcodec/jbig2/JBig2_Image.h | 95 +++++++++++++++++++++++------------- 1 file changed, 60 insertions(+), 35 deletions(-) (limited to 'core/src/fxcodec/jbig2/JBig2_Image.h') diff --git a/core/src/fxcodec/jbig2/JBig2_Image.h b/core/src/fxcodec/jbig2/JBig2_Image.h index 423bebcede..47215eaa3d 100644 --- a/core/src/fxcodec/jbig2/JBig2_Image.h +++ b/core/src/fxcodec/jbig2/JBig2_Image.h @@ -1,7 +1,7 @@ // 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 _JBIG2_IMAGE_H_ @@ -9,60 +9,85 @@ #include "JBig2_Define.h" #include "JBig2_Module.h" typedef enum { - JBIG2_COMPOSE_OR = 0, - JBIG2_COMPOSE_AND = 1, - JBIG2_COMPOSE_XOR = 2, - JBIG2_COMPOSE_XNOR = 3, - JBIG2_COMPOSE_REPLACE = 4 + JBIG2_COMPOSE_OR = 0, + JBIG2_COMPOSE_AND = 1, + JBIG2_COMPOSE_XOR = 2, + JBIG2_COMPOSE_XNOR = 3, + JBIG2_COMPOSE_REPLACE = 4 } JBig2ComposeOp; struct FX_RECT; -class CJBig2_Image : public CJBig2_Object -{ -public: - - CJBig2_Image(int32_t w, int32_t h); +class CJBig2_Image : public CJBig2_Object { + 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(int32_t w, int32_t h, int32_t stride, uint8_t* pBuf); - CJBig2_Image(CJBig2_Image &im); + CJBig2_Image(CJBig2_Image& im); - ~CJBig2_Image(); + ~CJBig2_Image(); - FX_BOOL getPixel(int32_t x, int32_t y); + FX_BOOL getPixel(int32_t x, int32_t y); - int32_t setPixel(int32_t x, int32_t y, FX_BOOL v); + int32_t setPixel(int32_t x, int32_t y, FX_BOOL v); - void copyLine(int32_t hTo, int32_t hFrom); + void copyLine(int32_t hTo, int32_t hFrom); - void fill(FX_BOOL v); + 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(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_unopt(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op); + FX_BOOL composeTo_unopt(CJBig2_Image* pDst, + int32_t x, + int32_t y, + JBig2ComposeOp op); - FX_BOOL composeTo_opt(CJBig2_Image *pDst, int32_t x, int32_t y, JBig2ComposeOp op); + FX_BOOL composeTo_opt(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); - FX_BOOL composeTo_opt2(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_unopt(int32_t x, int32_t y, int32_t w, int32_t h); + 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_unopt(int32_t x, int32_t y, int32_t w, int32_t h); - CJBig2_Image *subImage(int32_t x, int32_t y, int32_t w, int32_t h); + CJBig2_Image* subImage(int32_t x, int32_t y, int32_t w, int32_t h); - void expand(int32_t h, FX_BOOL v); -public: + void expand(int32_t h, FX_BOOL v); - int32_t m_nWidth; + public: + int32_t m_nWidth; - int32_t m_nHeight; + int32_t m_nHeight; - int32_t m_nStride; + int32_t m_nStride; - uint8_t *m_pData; + uint8_t* m_pData; - FX_BOOL m_bNeedFree; + FX_BOOL m_bNeedFree; }; #endif -- cgit v1.2.3