Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h

Issue 1816133002: Move xfa/include/fxbarcode/BC_Barcode.h to xfa/fxbarcode. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FXBARCODE_ONED_BC_ONEDCODABARWRITER_H_ 7 #ifndef XFA_FXBARCODE_ONED_BC_ONEDCODABARWRITER_H_
8 #define XFA_FXBARCODE_ONED_BC_ONEDCODABARWRITER_H_ 8 #define XFA_FXBARCODE_ONED_BC_ONEDCODABARWRITER_H_
9 9
10 enum BC_TEXT_LOC; 10 #include "core/include/fxcrt/fx_string.h"
11 class CBC_OneDimWriter; 11 #include "core/include/fxcrt/fx_system.h"
12 class CBC_OnedCodaBarWriter; 12 #include "xfa/fxbarcode/include/BC_Library.h"
13 #include "xfa/fxbarcode/oned/BC_OneDimWriter.h"
14
13 class CBC_OnedCodaBarWriter : public CBC_OneDimWriter { 15 class CBC_OnedCodaBarWriter : public CBC_OneDimWriter {
14 public: 16 public:
15 CBC_OnedCodaBarWriter(); 17 CBC_OnedCodaBarWriter();
16 virtual ~CBC_OnedCodaBarWriter(); 18 virtual ~CBC_OnedCodaBarWriter();
19
17 uint8_t* Encode(const CFX_ByteString& contents, 20 uint8_t* Encode(const CFX_ByteString& contents,
18 int32_t& outLength, 21 int32_t& outLength,
19 int32_t& e); 22 int32_t& e);
20 uint8_t* Encode(const CFX_ByteString& contents, 23 uint8_t* Encode(const CFX_ByteString& contents,
21 BCFORMAT format, 24 BCFORMAT format,
22 int32_t& outWidth, 25 int32_t& outWidth,
23 int32_t& outHeight, 26 int32_t& outHeight,
24 int32_t& e); 27 int32_t& e);
25 uint8_t* Encode(const CFX_ByteString& contents, 28 uint8_t* Encode(const CFX_ByteString& contents,
26 BCFORMAT format, 29 BCFORMAT format,
27 int32_t& outWidth, 30 int32_t& outWidth,
28 int32_t& outHeight, 31 int32_t& outHeight,
29 int32_t hints, 32 int32_t hints,
30 int32_t& e); 33 int32_t& e);
34
31 CFX_WideString encodedContents(const CFX_WideStringC& contents); 35 CFX_WideString encodedContents(const CFX_WideStringC& contents);
32 FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); 36 FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
33 CFX_WideString FilterContents(const CFX_WideStringC& contents); 37 CFX_WideString FilterContents(const CFX_WideStringC& contents);
34 FX_BOOL SetStartChar(FX_CHAR start); 38 FX_BOOL SetStartChar(FX_CHAR start);
35 FX_BOOL SetEndChar(FX_CHAR end); 39 FX_BOOL SetEndChar(FX_CHAR end);
36 void SetDataLength(int32_t length); 40 void SetDataLength(int32_t length);
37 FX_BOOL SetTextLocation(BC_TEXT_LOC location); 41 FX_BOOL SetTextLocation(BC_TEXT_LOC location);
38 FX_BOOL SetWideNarrowRatio(int32_t ratio); 42 FX_BOOL SetWideNarrowRatio(int32_t ratio);
39 FX_BOOL FindChar(FX_WCHAR ch, FX_BOOL isContent); 43 FX_BOOL FindChar(FX_WCHAR ch, FX_BOOL isContent);
40 44
41 private: 45 private:
46 static const FX_CHAR START_END_CHARS[];
47 static const FX_CHAR CONTENT_CHARS[];
48
42 void RenderResult(const CFX_WideStringC& contents, 49 void RenderResult(const CFX_WideStringC& contents,
43 uint8_t* code, 50 uint8_t* code,
44 int32_t codeLength, 51 int32_t codeLength,
45 FX_BOOL isDevice, 52 FX_BOOL isDevice,
46 int32_t& e); 53 int32_t& e);
47 static const FX_CHAR START_END_CHARS[]; 54
48 static const FX_CHAR CONTENT_CHARS[];
49 FX_CHAR m_chStart; 55 FX_CHAR m_chStart;
50 FX_CHAR m_chEnd; 56 FX_CHAR m_chEnd;
51 int32_t m_iWideNarrRatio; 57 int32_t m_iWideNarrRatio;
52 }; 58 };
53 59
54 #endif // XFA_FXBARCODE_ONED_BC_ONEDCODABARWRITER_H_ 60 #endif // XFA_FXBARCODE_ONED_BC_ONEDCODABARWRITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698