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 _FXMATH_BARCODEIMP_H_
8 #define _FXMATH_BARCODEIMP_H_
9 class CFX_Barcode : public IFX_Barcode {
10  public:
11   CFX_Barcode();
12   ~CFX_Barcode();
13   FX_BOOL Crreate(BC_TYPE type);
14   virtual void Release();
15   virtual BC_TYPE GetType();
16   virtual FX_BOOL Encode(const CFX_WideStringC& contents,
17                          FX_BOOL isDevice,
18                          int32_t& e);
19   virtual FX_BOOL RenderDevice(CFX_RenderDevice* device,
20                                const CFX_Matrix* matirx,
21                                int32_t& e);
22   virtual FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e);
23   virtual CFX_WideString Decode(uint8_t* buf,
24                                 int32_t width,
25                                 int32_t height,
26                                 int32_t& errorCode);
27   virtual CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& errorCode);
28   virtual FX_BOOL SetCharEncoding(BC_CHAR_ENCODING encoding);
29   virtual FX_BOOL SetModuleHeight(int32_t moduleHeight);
30   virtual FX_BOOL SetModuleWidth(int32_t moduleWidth);
31   virtual FX_BOOL SetHeight(int32_t height);
32   virtual FX_BOOL SetWidth(int32_t width);
33   virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
34   virtual FX_BOOL SetPrintChecksum(FX_BOOL checksum);
35   virtual FX_BOOL SetDataLength(int32_t length);
36   virtual FX_BOOL SetCalChecksum(int32_t state);
37   virtual FX_BOOL SetFont(CFX_Font* pFont);
38   virtual FX_BOOL SetFontSize(FX_FLOAT size);
39   virtual FX_BOOL SetFontStyle(int32_t style);
40   virtual FX_BOOL SetFontColor(FX_ARGB color);
41   virtual FX_BOOL SetTextLocation(BC_TEXT_LOC location);
42   virtual FX_BOOL SetWideNarrowRatio(int32_t ratio);
43   virtual FX_BOOL SetStartChar(FX_CHAR start);
44   virtual FX_BOOL SetEndChar(FX_CHAR end);
45   virtual FX_BOOL SetVersion(int32_t version);
46   virtual FX_BOOL SetErrorCorrectionLevel(int32_t level);
47   virtual FX_BOOL SetTruncated(FX_BOOL truncated);
48 
49  protected:
50   CBC_CodeBase* m_pBCEngine;
51 };
52 #endif
53