OLD | NEW |
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 _BC_ONEDIMWRITER_H_ | 7 #ifndef _BC_ONEDIMWRITER_H_ |
8 #define _BC_ONEDIMWRITER_H_ | 8 #define _BC_ONEDIMWRITER_H_ |
9 class CBC_Writer; | 9 class CBC_Writer; |
10 class CBC_CommonBitMatrix; | 10 class CBC_CommonBitMatrix; |
11 class CBC_OneDimWriter; | 11 class CBC_OneDimWriter; |
12 class CBC_OneDimWriter : public CBC_Writer | 12 class CBC_OneDimWriter : public CBC_Writer |
13 { | 13 { |
14 public: | 14 public: |
15 CBC_OneDimWriter(); | 15 CBC_OneDimWriter(); |
16 virtual ~CBC_OneDimWriter(); | 16 virtual ~CBC_OneDimWriter(); |
17 FX_BYTE» » » *Encode(const CFX_ByteString &contents, BCFORMAT
format, | 17 uint8_t» » » *Encode(const CFX_ByteString &contents, BCFORMAT
format, |
18 FX_INT32 &outWidth, FX_INT32 &outHeight, FX_INT32 &e
); | 18 int32_t &outWidth, int32_t &outHeight, int32_t &e); |
19 FX_BYTE» » » *Encode(const CFX_ByteString &contents, BCFORMAT
format, | 19 uint8_t» » » *Encode(const CFX_ByteString &contents, BCFORMAT
format, |
20 FX_INT32 &outWidth, FX_INT32 &outHeight, FX_INT32 hi
nts, FX_INT32 &e); | 20 int32_t &outWidth, int32_t &outHeight, int32_t hints
, int32_t &e); |
21 virtual FX_BYTE *Encode(const CFX_ByteString &contents, FX_INT32 &outLength,
FX_INT32 &e) | 21 virtual uint8_t *Encode(const CFX_ByteString &contents, int32_t &outLength,
int32_t &e) |
22 { | 22 { |
23 return NULL; | 23 return NULL; |
24 }; | 24 }; |
25 virtual void RenderResult(FX_WSTR contents, FX_BYTE* code, FX_INT32 code
Length, FX_BOOL isDevice, FX_INT32 &e); | 25 virtual void RenderResult(FX_WSTR contents, uint8_t* code, int32_t codeL
ength, FX_BOOL isDevice, int32_t &e); |
26 virtual void RenderBitmapResult(CFX_DIBitmap *&pOutBitmap, FX_WSTR conte
nts, FX_INT32 &e); | 26 virtual void RenderBitmapResult(CFX_DIBitmap *&pOutBitmap, FX_WSTR conte
nts, int32_t &e); |
27 virtual void RenderDeviceResult(CFX_RenderDevice* device, const CFX_Matr
ix* matrix, FX_WSTR contents, FX_INT32 &e); | 27 virtual void RenderDeviceResult(CFX_RenderDevice* device, const CFX_Matr
ix* matrix, FX_WSTR contents, int32_t &e); |
28 virtual FX_BOOL CheckContentValidity(FX_WSTR contents) | 28 virtual FX_BOOL CheckContentValidity(FX_WSTR contents) |
29 { | 29 { |
30 return TRUE; | 30 return TRUE; |
31 }; | 31 }; |
32 virtual CFX_WideString FilterContents(FX_WSTR contents) | 32 virtual CFX_WideString FilterContents(FX_WSTR contents) |
33 { | 33 { |
34 return CFX_WideString(); | 34 return CFX_WideString(); |
35 } | 35 } |
36 virtual CFX_WideString RenderTextContents(FX_WSTR contents) | 36 virtual CFX_WideString RenderTextContents(FX_WSTR contents) |
37 { | 37 { |
38 return CFX_WideString(); | 38 return CFX_WideString(); |
39 } | 39 } |
40 virtual void SetPrintChecksum(FX_BOOL checksum); | 40 virtual void SetPrintChecksum(FX_BOOL checksum); |
41 virtual void» » » SetDataLength(FX_INT32 length); | 41 virtual void» » » SetDataLength(int32_t length); |
42 virtual void» » » SetCalcChecksum(FX_INT32 state); | 42 virtual void» » » SetCalcChecksum(int32_t state); |
43 virtual void SetFontSize(FX_FLOAT size); | 43 virtual void SetFontSize(FX_FLOAT size); |
44 virtual void» » » SetFontStyle(FX_INT32 style); | 44 virtual void» » » SetFontStyle(int32_t style); |
45 virtual void SetFontColor(FX_ARGB color); | 45 virtual void SetFontColor(FX_ARGB color); |
46 virtual FX_BOOL SetFont(CFX_Font * cFont); | 46 virtual FX_BOOL SetFont(CFX_Font * cFont); |
47 protected: | 47 protected: |
48 FX_BOOL m_bPrintChecksum; | 48 FX_BOOL m_bPrintChecksum; |
49 FX_INT32» » m_iDataLenth; | 49 int32_t» » m_iDataLenth; |
50 FX_BOOL m_bCalcChecksum; | 50 FX_BOOL m_bCalcChecksum; |
51 CFX_Font* m_pFont; | 51 CFX_Font* m_pFont; |
52 FX_FLOAT m_fFontSize; | 52 FX_FLOAT m_fFontSize; |
53 FX_INT32» » m_iFontStyle; | 53 int32_t» » m_iFontStyle; |
54 FX_DWORD m_fontColor; | 54 FX_DWORD m_fontColor; |
55 BC_TEXT_LOC m_locTextLoc; | 55 BC_TEXT_LOC m_locTextLoc; |
56 FX_INT32» » m_iContentLen; | 56 int32_t» » m_iContentLen; |
57 FX_BOOL m_bLeftPadding; | 57 FX_BOOL m_bLeftPadding; |
58 FX_BOOL m_bRightPadding; | 58 FX_BOOL m_bRightPadding; |
59 CBC_CommonBitMatrix* m_output; | 59 CBC_CommonBitMatrix* m_output; |
60 FX_INT32 m_barWidth; | 60 int32_t m_barWidth; |
61 FX_INT32 m_multiple; | 61 int32_t m_multiple; |
62 FX_FLOAT m_outputHScale; | 62 FX_FLOAT m_outputHScale; |
63 void» » » CalcTextInfo(const CFX_ByteString &text, FXTEXT_
CHARPOS *charPos, CFX_Font *cFont, FX_FLOAT geWidth, FX_INT32 fontSize, FX_FLOAT
&charsLen); | 63 void» » » CalcTextInfo(const CFX_ByteString &text, FXTEXT_
CHARPOS *charPos, CFX_Font *cFont, FX_FLOAT geWidth, int32_t fontSize, FX_FLOAT
&charsLen); |
64 virtual void» ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CF
X_RenderDevice *device, const CFX_Matrix* matrix, FX_INT32 barWidth, FX_INT32 mu
ltiple, FX_INT32 &e); | 64 virtual void» ShowChars(FX_WSTR contents, CFX_DIBitmap *pOutBitmap, CF
X_RenderDevice *device, const CFX_Matrix* matrix, int32_t barWidth, int32_t mult
iple, int32_t &e); |
65 virtual void» ShowBitmapChars(CFX_DIBitmap *pOutBitmap, const CFX_Byte
String str, FX_FLOAT geWidth, FXTEXT_CHARPOS* pCharPos, FX_FLOAT locX, FX_FLOAT
locY, FX_INT32 barWidth); | 65 virtual void» ShowBitmapChars(CFX_DIBitmap *pOutBitmap, const CFX_Byte
String str, FX_FLOAT geWidth, FXTEXT_CHARPOS* pCharPos, FX_FLOAT locX, FX_FLOAT
locY, int32_t barWidth); |
66 virtual void ShowDeviceChars(CFX_RenderDevice *device, const CFX_Matrix*
matrix, const CFX_ByteString str, FX_FLOAT geWidth, FXTEXT_CHARPOS* pCharPos, FX
_FLOAT locX, FX_FLOAT locY, FX_INT32 barWidth); | 66 virtual void ShowDeviceChars(CFX_RenderDevice *device, const CFX_Matrix*
matrix, const CFX_ByteString str, FX_FLOAT geWidth, FXTEXT_CHARPOS* pCharPos, FX
_FLOAT locX, FX_FLOAT locY, int32_t barWidth); |
67 FX_INT32» » AppendPattern(FX_BYTE* target, FX_INT32 pos, const FX_IN
T32* pattern, FX_INT32 patternLength, FX_INT32 startColor, FX_INT32 &e); | 67 int32_t» » AppendPattern(uint8_t* target, int32_t pos, const int32_
t* pattern, int32_t patternLength, int32_t startColor, int32_t &e); |
68 FX_WCHAR Upper(FX_WCHAR ch); | 68 FX_WCHAR Upper(FX_WCHAR ch); |
69 }; | 69 }; |
70 #endif | 70 #endif |
OLD | NEW |