| OLD | NEW |
| (Empty) |
| 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_ONEDIMWRITER_H_ | |
| 8 #define _BC_ONEDIMWRITER_H_ | |
| 9 class CBC_Writer; | |
| 10 class CBC_CommonBitMatrix; | |
| 11 class CBC_OneDimWriter; | |
| 12 class CBC_OneDimWriter : public CBC_Writer | |
| 13 { | |
| 14 public: | |
| 15 CBC_OneDimWriter(); | |
| 16 virtual ~CBC_OneDimWriter(); | |
| 17 FX_BYTE *Encode(const CFX_ByteString &contents, BCFORMAT
format, | |
| 18 FX_INT32 &outWidth, FX_INT32 &outHeight, FX_INT32 &e
); | |
| 19 FX_BYTE *Encode(const CFX_ByteString &contents, BCFORMAT
format, | |
| 20 FX_INT32 &outWidth, FX_INT32 &outHeight, FX_INT32 hi
nts, FX_INT32 &e); | |
| 21 virtual FX_BYTE *Encode(const CFX_ByteString &contents, FX_INT32 &outLength,
FX_INT32 &e) | |
| 22 { | |
| 23 return NULL; | |
| 24 }; | |
| 25 virtual void RenderResult(FX_WSTR contents, FX_BYTE* code, FX_INT32 code
Length, FX_BOOL isDevice, FX_INT32 &e); | |
| 26 virtual void RenderBitmapResult(CFX_DIBitmap *&pOutBitmap, FX_WSTR conte
nts, FX_INT32 &e); | |
| 27 virtual void RenderDeviceResult(CFX_RenderDevice* device, const CFX_Matr
ix* matrix, FX_WSTR contents, FX_INT32 &e); | |
| 28 virtual FX_BOOL CheckContentValidity(FX_WSTR contents) | |
| 29 { | |
| 30 return TRUE; | |
| 31 }; | |
| 32 virtual CFX_WideString FilterContents(FX_WSTR contents) | |
| 33 { | |
| 34 return CFX_WideString(); | |
| 35 } | |
| 36 virtual CFX_WideString RenderTextContents(FX_WSTR contents) | |
| 37 { | |
| 38 return CFX_WideString(); | |
| 39 } | |
| 40 virtual void SetPrintChecksum(FX_BOOL checksum); | |
| 41 virtual void SetDataLength(FX_INT32 length); | |
| 42 virtual void SetCalcChecksum(FX_INT32 state); | |
| 43 virtual void SetFontSize(FX_FLOAT size); | |
| 44 virtual void SetFontStyle(FX_INT32 style); | |
| 45 virtual void SetFontColor(FX_ARGB color); | |
| 46 virtual FX_BOOL SetFont(CFX_Font * cFont); | |
| 47 protected: | |
| 48 FX_BOOL m_bPrintChecksum; | |
| 49 FX_INT32 m_iDataLenth; | |
| 50 FX_BOOL m_bCalcChecksum; | |
| 51 CFX_Font* m_pFont; | |
| 52 FX_FLOAT m_fFontSize; | |
| 53 FX_INT32 m_iFontStyle; | |
| 54 FX_DWORD m_fontColor; | |
| 55 BC_TEXT_LOC m_locTextLoc; | |
| 56 FX_INT32 m_iContentLen; | |
| 57 FX_BOOL m_bLeftPadding; | |
| 58 FX_BOOL m_bRightPadding; | |
| 59 CBC_CommonBitMatrix* m_output; | |
| 60 FX_INT32 m_barWidth; | |
| 61 FX_INT32 m_multiple; | |
| 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); | |
| 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); | |
| 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); | |
| 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); | |
| 67 FX_INT32 AppendPattern(FX_BYTE* target, FX_INT32 pos, const FX_IN
T32* pattern, FX_INT32 patternLength, FX_INT32 startColor, FX_INT32 &e); | |
| 68 FX_WCHAR Upper(FX_WCHAR ch); | |
| 69 }; | |
| 70 #endif | |
| OLD | NEW |