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 XFA_SRC_FDE_TTO_FDE_TEXTOUT_H_ | |
8 #define XFA_SRC_FDE_TTO_FDE_TEXTOUT_H_ | |
9 | |
10 #include "core/include/fxge/fx_dib.h" | |
11 #include "core/include/fxge/fx_ge.h" | |
12 #include "xfa/src/fgas/font/fgas_font.h" | |
13 | |
14 #define FDE_TTOSTYLE_Underline 0x0001 | |
15 #define FDE_TTOSTYLE_Strikeout 0x0002 | |
16 #define FDE_TTOSTYLE_VerticalLayout 0x0004 | |
17 #define FDE_TTOSTYLE_SingleLine 0x0010 | |
18 #define FDE_TTOSTYLE_ExpandTab 0x0020 | |
19 #define FDE_TTOSTYLE_HotKey 0x0040 | |
20 #define FDE_TTOSTYLE_Ellipsis 0x0080 | |
21 #define FDE_TTOSTYLE_LineWrap 0x0100 | |
22 #define FDE_TTOSTYLE_ArabicShapes 0x0200 | |
23 #define FDE_TTOSTYLE_RTL 0x0400 | |
24 #define FDE_TTOSTYLE_ArabicContext 0x0800 | |
25 #define FDE_TTOSTYLE_LastLineHeight 0x1000 | |
26 #define FDE_TTOALIGNMENT_TopLeft 0 | |
27 #define FDE_TTOALIGNMENT_TopCenter 1 | |
28 #define FDE_TTOALIGNMENT_TopRight 2 | |
29 #define FDE_TTOALIGNMENT_TopAuto 3 | |
30 #define FDE_TTOALIGNMENT_CenterLeft 4 | |
31 #define FDE_TTOALIGNMENT_Center 5 | |
32 #define FDE_TTOALIGNMENT_CenterRight 6 | |
33 #define FDE_TTOALIGNMENT_CenterAuto 7 | |
34 #define FDE_TTOALIGNMENT_BottomLeft 8 | |
35 #define FDE_TTOALIGNMENT_BottomCenter 9 | |
36 #define FDE_TTOALIGNMENT_BottomRight 10 | |
37 #define FDE_TTOALIGNMENT_BottomAuto 11 | |
38 | |
39 class IFDE_TextOut { | |
40 public: | |
41 static IFDE_TextOut* Create(); | |
42 virtual ~IFDE_TextOut() {} | |
43 virtual void Release() = 0; | |
44 virtual void SetFont(IFX_Font* pFont) = 0; | |
45 virtual void SetFontSize(FX_FLOAT fFontSize) = 0; | |
46 virtual void SetTextColor(FX_ARGB color) = 0; | |
47 virtual void SetStyles(FX_DWORD dwStyles) = 0; | |
48 virtual void SetTabWidth(FX_FLOAT fTabWidth) = 0; | |
49 virtual void SetEllipsisString(const CFX_WideString& wsEllipsis) = 0; | |
50 virtual void SetParagraphBreakChar(FX_WCHAR wch) = 0; | |
51 virtual void SetAlignment(int32_t iAlignment) = 0; | |
52 virtual void SetLineSpace(FX_FLOAT fLineSpace) = 0; | |
53 virtual void SetDIBitmap(CFX_DIBitmap* pDIB) = 0; | |
54 virtual void SetRenderDevice(CFX_RenderDevice* pDevice) = 0; | |
55 virtual void SetClipRect(const CFX_Rect& rtClip) = 0; | |
56 virtual void SetClipRect(const CFX_RectF& rtClip) = 0; | |
57 virtual void SetMatrix(const CFX_Matrix& matrix) = 0; | |
58 virtual void SetLineBreakTolerance(FX_FLOAT fTolerance) = 0; | |
59 virtual void CalcSize(const FX_WCHAR* pwsStr, | |
60 int32_t iLength, | |
61 CFX_Size& size) = 0; | |
62 virtual void CalcSize(const FX_WCHAR* pwsStr, | |
63 int32_t iLength, | |
64 CFX_SizeF& size) = 0; | |
65 virtual void CalcSize(const FX_WCHAR* pwsStr, | |
66 int32_t iLength, | |
67 CFX_Rect& rect) = 0; | |
68 virtual void CalcSize(const FX_WCHAR* pwsStr, | |
69 int32_t iLength, | |
70 CFX_RectF& rect) = 0; | |
71 virtual void DrawText(const FX_WCHAR* pwsStr, | |
72 int32_t iLength, | |
73 int32_t x, | |
74 int32_t y) = 0; | |
75 virtual void DrawText(const FX_WCHAR* pwsStr, | |
76 int32_t iLength, | |
77 FX_FLOAT x, | |
78 FX_FLOAT y) = 0; | |
79 virtual void DrawText(const FX_WCHAR* pwsStr, | |
80 int32_t iLength, | |
81 const CFX_Rect& rect) = 0; | |
82 virtual void DrawText(const FX_WCHAR* pwsStr, | |
83 int32_t iLength, | |
84 const CFX_RectF& rect) = 0; | |
85 virtual void SetLogicClipRect(const CFX_RectF& rtClip) = 0; | |
86 virtual void CalcLogicSize(const FX_WCHAR* pwsStr, | |
87 int32_t iLength, | |
88 CFX_SizeF& size) = 0; | |
89 virtual void CalcLogicSize(const FX_WCHAR* pwsStr, | |
90 int32_t iLength, | |
91 CFX_RectF& rect) = 0; | |
92 virtual void DrawLogicText(const FX_WCHAR* pwsStr, | |
93 int32_t iLength, | |
94 FX_FLOAT x, | |
95 FX_FLOAT y) = 0; | |
96 virtual void DrawLogicText(const FX_WCHAR* pwsStr, | |
97 int32_t iLength, | |
98 const CFX_RectF& rect) = 0; | |
99 virtual int32_t GetTotalLines() = 0; | |
100 }; | |
101 | |
102 #endif // XFA_SRC_FDE_TTO_FDE_TEXTOUT_H_ | |
OLD | NEW |