From a902979f7c6a39fbdd8e9fc1b2ce00553b655eeb Mon Sep 17 00:00:00 2001 From: Bo Xu Date: Fri, 9 Jan 2015 17:27:21 -0800 Subject: Organize barcode codes into modules. Previously all the files in barcode are lumped together. The naming of some files are inconsistent, leading to difficult understanding of the structure. Now files are grouped based on different barcode type like in zxing. This also matches what it looks like in other xfa folders. The file names in each folder could be further modified to be consistent. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/842043002 --- xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h (limited to 'xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h') diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h b/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h new file mode 100644 index 0000000000..b37d9d8e19 --- /dev/null +++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Writer.h @@ -0,0 +1,37 @@ +// 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 _BC_ONEDCODA39WRITER_H_ +#define _BC_ONEDCODA39WRITER_H_ +enum BC_TEXT_LOC; +class CBC_OneDimWriter; +class CBC_OnedCoda39Writer; +class CBC_OnedCode39Writer : public CBC_OneDimWriter +{ +public: + CBC_OnedCode39Writer(); + CBC_OnedCode39Writer(FX_BOOL extendedMode); + virtual ~CBC_OnedCode39Writer(); + FX_BYTE *Encode(const CFX_ByteString &contents, BCFORMAT format, FX_INT32 &outWidth, FX_INT32 &outHeight, FX_INT32 &e); + FX_BYTE *Encode(const CFX_ByteString &contents, BCFORMAT format, FX_INT32 &outWidth, FX_INT32 &outHeight, FX_INT32 hints, FX_INT32 &e); + FX_BYTE *Encode(const CFX_ByteString &contents, FX_INT32 &outLength, FX_INT32 &e); + void RenderResult(FX_WSTR contents, FX_BYTE* code, FX_INT32 codeLength, FX_BOOL isDevice, FX_INT32 &e); + CFX_WideString encodedContents(FX_WSTR contents, FX_INT32 &e); + FX_BOOL CheckContentValidity(FX_WSTR contents); + FX_BOOL CheckExtendedContentValidity(FX_WSTR contents); + CFX_WideString FilterContents(FX_WSTR contents); + CFX_WideString FilterExtendedContents(FX_WSTR contents); + CFX_WideString RenderTextContents(FX_WSTR contents); + CFX_WideString RenderExtendedTextContents(FX_WSTR contents); + FX_BOOL SetTextLocation(BC_TEXT_LOC loction); + FX_BOOL SetWideNarrowRatio(FX_INT32 ratio); +private: + void ToIntArray(FX_INT32 a, FX_INT32 *toReturn); + FX_CHAR CalcCheckSum(const CFX_ByteString &contents, FX_INT32 &e); + FX_INT32 m_iWideNarrRatio; + FX_BOOL m_extendedMode; +}; +#endif -- cgit v1.2.3