1 // Copyright 2014 PDFium Authors. All rights reserved. 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 _BC_ONEDEAN13WRITER_H_ 8 #define _BC_ONEDEAN13WRITER_H_ 9 class CBC_OneDimWriter; 10 class CBC_OnedEAN13Writer; 11 class CBC_OnedEAN13Writer : public CBC_OneDimWriter { 12 private: 13 int32_t m_codeWidth; 14 15 public: 16 CBC_OnedEAN13Writer(); 17 virtual ~CBC_OnedEAN13Writer(); 18 19 uint8_t* Encode(const CFX_ByteString& contents, 20 BCFORMAT format, 21 int32_t& outWidth, 22 int32_t& outHeight, 23 int32_t& e); 24 uint8_t* Encode(const CFX_ByteString& contents, 25 BCFORMAT format, 26 int32_t& outWidth, 27 int32_t& outHeight, 28 int32_t hints, 29 int32_t& e); 30 uint8_t* Encode(const CFX_ByteString& contents, 31 int32_t& outLength, 32 int32_t& e); 33 void RenderResult(const CFX_WideStringC& contents, 34 uint8_t* code, 35 int32_t codeLength, 36 FX_BOOL isDevice, 37 int32_t& e); 38 FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); 39 CFX_WideString FilterContents(const CFX_WideStringC& contents); 40 int32_t CalcChecksum(const CFX_ByteString& contents); 41 42 protected: 43 void ShowChars(const CFX_WideStringC& contents, 44 CFX_DIBitmap* pOutBitmap, 45 CFX_RenderDevice* device, 46 const CFX_Matrix* matrix, 47 int32_t barWidth, 48 int32_t multiple, 49 int32_t& e); 50 }; 51 #endif 52