1 // Copyright 2014 The PDFium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef CORE_FXCODEC_FX_CODEC_H_ 8 #define CORE_FXCODEC_FX_CODEC_H_ 9 10 #include <stdint.h> 11 12 namespace fxcodec { 13 14 #ifdef PDF_ENABLE_XFA 15 class CFX_DIBAttribute { 16 public: 17 // Not an enum class yet because we still blindly cast integer results 18 // from third-party libraries to this type. 19 enum ResUnit : uint16_t { 20 kResUnitNone = 0, 21 kResUnitInch, 22 kResUnitCentimeter, 23 kResUnitMeter 24 }; 25 26 CFX_DIBAttribute(); 27 ~CFX_DIBAttribute(); 28 29 int32_t m_nXDPI = -1; 30 int32_t m_nYDPI = -1; 31 ResUnit m_wDPIUnit = kResUnitNone; 32 }; 33 #endif // PDF_ENABLE_XFA 34 35 void ReverseRGB(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels); 36 37 } // namespace fxcodec 38 39 #ifdef PDF_ENABLE_XFA 40 using CFX_DIBAttribute = fxcodec::CFX_DIBAttribute; 41 #endif 42 43 #endif // CORE_FXCODEC_FX_CODEC_H_ 44