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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_UTILS_H_ | 7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_UTILS_H_ |
8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_UTILS_H_ | 8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_UTILS_H_ |
9 | 9 |
10 #include "core/include/fpdfapi/fpdf_parser.h" // For CPDF_Point. | 10 #include "core/include/fpdfapi/fpdf_parser.h" // For CFX_FloatPoint. |
11 #include "core/include/fpdfdoc/fpdf_vt.h" // For CPVT_WordRange. | 11 #include "core/include/fpdfdoc/fpdf_vt.h" // For CPVT_WordRange. |
12 #include "fpdfsdk/include/fxedit/fx_edit.h" | 12 #include "fpdfsdk/include/fxedit/fx_edit.h" |
13 #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" | 13 #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" |
14 | 14 |
15 class CFX_PathData; | 15 class CFX_PathData; |
16 struct CPWL_Color; | 16 struct CPWL_Color; |
17 | 17 |
18 template <class T> | 18 template <class T> |
19 T PWL_MIN(const T& i, const T& j) { | 19 T PWL_MIN(const T& i, const T& j) { |
20 return ((i < j) ? i : j); | 20 return ((i < j) ? i : j); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 // pushbutton layout style | 68 // pushbutton layout style |
69 #define PPBL_LABEL 0 | 69 #define PPBL_LABEL 0 |
70 #define PPBL_ICON 1 | 70 #define PPBL_ICON 1 |
71 #define PPBL_ICONTOPLABELBOTTOM 2 | 71 #define PPBL_ICONTOPLABELBOTTOM 2 |
72 #define PPBL_LABELTOPICONBOTTOM 3 | 72 #define PPBL_LABELTOPICONBOTTOM 3 |
73 #define PPBL_ICONLEFTLABELRIGHT 4 | 73 #define PPBL_ICONLEFTLABELRIGHT 4 |
74 #define PPBL_LABELLEFTICONRIGHT 5 | 74 #define PPBL_LABELLEFTICONRIGHT 5 |
75 #define PPBL_LABELOVERICON 6 | 75 #define PPBL_LABELOVERICON 6 |
76 | 76 |
77 class CPWL_Point : public CPDF_Point { | 77 class CPWL_Point : public CFX_FloatPoint { |
78 public: | 78 public: |
79 CPWL_Point() : CPDF_Point(0.0f, 0.0f) {} | 79 CPWL_Point() : CFX_FloatPoint(0.0f, 0.0f) {} |
80 CPWL_Point(FX_FLOAT fx, FX_FLOAT fy) : CPDF_Point(fx, fy) {} | 80 CPWL_Point(FX_FLOAT fx, FX_FLOAT fy) : CFX_FloatPoint(fx, fy) {} |
81 CPWL_Point(const CPWL_Point& point) : CPDF_Point(point.x, point.y) {} | 81 CPWL_Point(const CPWL_Point& point) : CFX_FloatPoint(point.x, point.y) {} |
82 }; | 82 }; |
83 | 83 |
84 enum PWL_PATHDATA_TYPE { | 84 enum PWL_PATHDATA_TYPE { |
85 PWLPT_MOVETO, | 85 PWLPT_MOVETO, |
86 PWLPT_LINETO, | 86 PWLPT_LINETO, |
87 PWLPT_BEZIERTO, | 87 PWLPT_BEZIERTO, |
88 PWLPT_UNKNOWN | 88 PWLPT_UNKNOWN |
89 }; | 89 }; |
90 | 90 |
91 enum PWL_PATH_TYPE { PWLPT_PATHDATA, PWLPT_STREAM }; | 91 enum PWL_PATH_TYPE { PWLPT_PATHDATA, PWLPT_STREAM }; |
92 | 92 |
93 class CPWL_PathData { | 93 class CPWL_PathData { |
94 public: | 94 public: |
95 CPWL_PathData() : point(), type(PWLPT_UNKNOWN) {} | 95 CPWL_PathData() : point(), type(PWLPT_UNKNOWN) {} |
96 CPWL_PathData(const CPWL_Point& pt, PWL_PATHDATA_TYPE tp) | 96 CPWL_PathData(const CPWL_Point& pt, PWL_PATHDATA_TYPE tp) |
97 : point(pt), type(tp) {} | 97 : point(pt), type(tp) {} |
98 | 98 |
99 CPWL_Point point; | 99 CPWL_Point point; |
100 PWL_PATHDATA_TYPE type; | 100 PWL_PATHDATA_TYPE type; |
101 }; | 101 }; |
102 | 102 |
103 class IPWL_SpellCheck; | 103 class IPWL_SpellCheck; |
104 | 104 |
105 class CPWL_Utils { | 105 class CPWL_Utils { |
106 public: | 106 public: |
107 static CPDF_Rect InflateRect(const CPDF_Rect& rcRect, FX_FLOAT fSize); | 107 static CFX_FloatRect InflateRect(const CFX_FloatRect& rcRect, FX_FLOAT fSize); |
108 static CPDF_Rect DeflateRect(const CPDF_Rect& rcRect, FX_FLOAT fSize); | 108 static CFX_FloatRect DeflateRect(const CFX_FloatRect& rcRect, FX_FLOAT fSize); |
109 static FX_BOOL IntersectRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2); | 109 static FX_BOOL IntersectRect(const CFX_FloatRect& rect1, |
110 static FX_BOOL ContainsRect(const CPDF_Rect& rcParent, | 110 const CFX_FloatRect& rect2); |
111 const CPDF_Rect& rcChild); | 111 static FX_BOOL ContainsRect(const CFX_FloatRect& rcParent, |
112 static CPDF_Rect ScaleRect(const CPDF_Rect& rcRect, FX_FLOAT fScale); | 112 const CFX_FloatRect& rcChild); |
| 113 static CFX_FloatRect ScaleRect(const CFX_FloatRect& rcRect, FX_FLOAT fScale); |
113 static CPVT_WordRange OverlapWordRange(const CPVT_WordRange& wr1, | 114 static CPVT_WordRange OverlapWordRange(const CPVT_WordRange& wr1, |
114 const CPVT_WordRange& wr2); | 115 const CPVT_WordRange& wr2); |
115 static CPDF_Rect GetCenterSquare(const CPDF_Rect& rect); | 116 static CFX_FloatRect GetCenterSquare(const CFX_FloatRect& rect); |
116 static CPWL_Color SubstractColor(const CPWL_Color& sColor, | 117 static CPWL_Color SubstractColor(const CPWL_Color& sColor, |
117 FX_FLOAT fColorSub); | 118 FX_FLOAT fColorSub); |
118 static CPWL_Color DevideColor(const CPWL_Color& sColor, | 119 static CPWL_Color DevideColor(const CPWL_Color& sColor, |
119 FX_FLOAT fColorDevide); | 120 FX_FLOAT fColorDevide); |
120 static CPDF_Rect MaxRect(const CPDF_Rect& rect1, const CPDF_Rect& rect2); | 121 static CFX_FloatRect MaxRect(const CFX_FloatRect& rect1, |
121 static CPDF_Rect OffsetRect(const CPDF_Rect& rect, FX_FLOAT x, FX_FLOAT y); | 122 const CFX_FloatRect& rect2); |
122 static CPDF_Point OffsetPoint(const CPDF_Point& point, | 123 static CFX_FloatRect OffsetRect(const CFX_FloatRect& rect, |
123 FX_FLOAT x, | 124 FX_FLOAT x, |
124 FX_FLOAT y); | 125 FX_FLOAT y); |
| 126 static CFX_FloatPoint OffsetPoint(const CFX_FloatPoint& point, |
| 127 FX_FLOAT x, |
| 128 FX_FLOAT y); |
125 static FX_COLORREF PWLColorToFXColor(const CPWL_Color& color, | 129 static FX_COLORREF PWLColorToFXColor(const CPWL_Color& color, |
126 int32_t nTransparancy = 255); | 130 int32_t nTransparancy = 255); |
127 static FX_BOOL IsBlackOrWhite(const CPWL_Color& color); | 131 static FX_BOOL IsBlackOrWhite(const CPWL_Color& color); |
128 static CPWL_Color GetReverseColor(const CPWL_Color& color); | 132 static CPWL_Color GetReverseColor(const CPWL_Color& color); |
129 | 133 |
130 static CFX_ByteString GetColorAppStream(const CPWL_Color& color, | 134 static CFX_ByteString GetColorAppStream(const CPWL_Color& color, |
131 const FX_BOOL& bFillOrStroke = TRUE); | 135 const FX_BOOL& bFillOrStroke = TRUE); |
132 static CFX_ByteString GetBorderAppStream(const CPDF_Rect& rect, | 136 static CFX_ByteString GetBorderAppStream(const CFX_FloatRect& rect, |
133 FX_FLOAT fWidth, | 137 FX_FLOAT fWidth, |
134 const CPWL_Color& color, | 138 const CPWL_Color& color, |
135 const CPWL_Color& crLeftTop, | 139 const CPWL_Color& crLeftTop, |
136 const CPWL_Color& crRightBottom, | 140 const CPWL_Color& crRightBottom, |
137 int32_t nStyle, | 141 int32_t nStyle, |
138 const CPWL_Dash& dash); | 142 const CPWL_Dash& dash); |
139 static CFX_ByteString GetCircleBorderAppStream( | 143 static CFX_ByteString GetCircleBorderAppStream( |
140 const CPDF_Rect& rect, | 144 const CFX_FloatRect& rect, |
141 FX_FLOAT fWidth, | 145 FX_FLOAT fWidth, |
142 const CPWL_Color& color, | 146 const CPWL_Color& color, |
143 const CPWL_Color& crLeftTop, | 147 const CPWL_Color& crLeftTop, |
144 const CPWL_Color& crRightBottom, | 148 const CPWL_Color& crRightBottom, |
145 int32_t nStyle, | 149 int32_t nStyle, |
146 const CPWL_Dash& dash); | 150 const CPWL_Dash& dash); |
147 static CFX_ByteString GetRectFillAppStream(const CPDF_Rect& rect, | 151 static CFX_ByteString GetRectFillAppStream(const CFX_FloatRect& rect, |
148 const CPWL_Color& color); | 152 const CPWL_Color& color); |
149 static CFX_ByteString GetCircleFillAppStream(const CPDF_Rect& rect, | 153 static CFX_ByteString GetCircleFillAppStream(const CFX_FloatRect& rect, |
150 const CPWL_Color& color); | 154 const CPWL_Color& color); |
151 | 155 |
152 static CFX_ByteString GetPushButtonAppStream(const CPDF_Rect& rcBBox, | 156 static CFX_ByteString GetPushButtonAppStream(const CFX_FloatRect& rcBBox, |
153 IFX_Edit_FontMap* pFontMap, | 157 IFX_Edit_FontMap* pFontMap, |
154 CPDF_Stream* pIconStream, | 158 CPDF_Stream* pIconStream, |
155 CPDF_IconFit& IconFit, | 159 CPDF_IconFit& IconFit, |
156 const CFX_WideString& sLabel, | 160 const CFX_WideString& sLabel, |
157 const CPWL_Color& crText, | 161 const CPWL_Color& crText, |
158 FX_FLOAT fFontSize, | 162 FX_FLOAT fFontSize, |
159 int32_t nLayOut); | 163 int32_t nLayOut); |
160 static CFX_ByteString GetCheckBoxAppStream(const CPDF_Rect& rcBBox, | 164 static CFX_ByteString GetCheckBoxAppStream(const CFX_FloatRect& rcBBox, |
161 int32_t nStyle, | 165 int32_t nStyle, |
162 const CPWL_Color& crText); | 166 const CPWL_Color& crText); |
163 static CFX_ByteString GetRadioButtonAppStream(const CPDF_Rect& rcBBox, | 167 static CFX_ByteString GetRadioButtonAppStream(const CFX_FloatRect& rcBBox, |
164 int32_t nStyle, | 168 int32_t nStyle, |
165 const CPWL_Color& crText); | 169 const CPWL_Color& crText); |
166 | 170 |
167 static CFX_ByteString GetEditAppStream(IFX_Edit* pEdit, | 171 static CFX_ByteString GetEditAppStream(IFX_Edit* pEdit, |
168 const CPDF_Point& ptOffset, | 172 const CFX_FloatPoint& ptOffset, |
169 const CPVT_WordRange* pRange = NULL, | 173 const CPVT_WordRange* pRange = NULL, |
170 FX_BOOL bContinuous = TRUE, | 174 FX_BOOL bContinuous = TRUE, |
171 FX_WORD SubWord = 0); | 175 FX_WORD SubWord = 0); |
172 static CFX_ByteString GetEditSelAppStream( | 176 static CFX_ByteString GetEditSelAppStream( |
173 IFX_Edit* pEdit, | 177 IFX_Edit* pEdit, |
174 const CPDF_Point& ptOffset, | 178 const CFX_FloatPoint& ptOffset, |
175 const CPVT_WordRange* pRange = NULL); | 179 const CPVT_WordRange* pRange = NULL); |
176 static CFX_ByteString GetSpellCheckAppStream( | 180 static CFX_ByteString GetSpellCheckAppStream( |
177 IFX_Edit* pEdit, | 181 IFX_Edit* pEdit, |
178 IPWL_SpellCheck* pSpellCheck, | 182 IPWL_SpellCheck* pSpellCheck, |
179 const CPDF_Point& ptOffset, | 183 const CFX_FloatPoint& ptOffset, |
180 const CPVT_WordRange* pRange = NULL); | 184 const CPVT_WordRange* pRange = NULL); |
181 static CFX_ByteString GetTextAppStream(const CPDF_Rect& rcBBox, | 185 static CFX_ByteString GetTextAppStream(const CFX_FloatRect& rcBBox, |
182 IFX_Edit_FontMap* pFontMap, | 186 IFX_Edit_FontMap* pFontMap, |
183 const CFX_WideString& sText, | 187 const CFX_WideString& sText, |
184 int32_t nAlignmentH, | 188 int32_t nAlignmentH, |
185 int32_t nAlignmentV, | 189 int32_t nAlignmentV, |
186 FX_FLOAT fFontSize, | 190 FX_FLOAT fFontSize, |
187 FX_BOOL bMultiLine, | 191 FX_BOOL bMultiLine, |
188 FX_BOOL bAutoReturn, | 192 FX_BOOL bAutoReturn, |
189 const CPWL_Color& crText); | 193 const CPWL_Color& crText); |
190 static CFX_ByteString GetDropButtonAppStream(const CPDF_Rect& rcBBox); | 194 static CFX_ByteString GetDropButtonAppStream(const CFX_FloatRect& rcBBox); |
191 | 195 |
192 static void DrawFillRect(CFX_RenderDevice* pDevice, | 196 static void DrawFillRect(CFX_RenderDevice* pDevice, |
193 CFX_Matrix* pUser2Device, | 197 CFX_Matrix* pUser2Device, |
194 const CPDF_Rect& rect, | 198 const CFX_FloatRect& rect, |
195 const CPWL_Color& color, | 199 const CPWL_Color& color, |
196 int32_t nTransparancy); | 200 int32_t nTransparancy); |
197 static void DrawFillRect(CFX_RenderDevice* pDevice, | 201 static void DrawFillRect(CFX_RenderDevice* pDevice, |
198 CFX_Matrix* pUser2Device, | 202 CFX_Matrix* pUser2Device, |
199 const CPDF_Rect& rect, | 203 const CFX_FloatRect& rect, |
200 const FX_COLORREF& color); | 204 const FX_COLORREF& color); |
201 static void DrawStrokeRect(CFX_RenderDevice* pDevice, | 205 static void DrawStrokeRect(CFX_RenderDevice* pDevice, |
202 CFX_Matrix* pUser2Device, | 206 CFX_Matrix* pUser2Device, |
203 const CPDF_Rect& rect, | 207 const CFX_FloatRect& rect, |
204 const FX_COLORREF& color, | 208 const FX_COLORREF& color, |
205 FX_FLOAT fWidth); | 209 FX_FLOAT fWidth); |
206 static void DrawStrokeLine(CFX_RenderDevice* pDevice, | 210 static void DrawStrokeLine(CFX_RenderDevice* pDevice, |
207 CFX_Matrix* pUser2Device, | 211 CFX_Matrix* pUser2Device, |
208 const CPDF_Point& ptMoveTo, | 212 const CFX_FloatPoint& ptMoveTo, |
209 const CPDF_Point& ptLineTo, | 213 const CFX_FloatPoint& ptLineTo, |
210 const FX_COLORREF& color, | 214 const FX_COLORREF& color, |
211 FX_FLOAT fWidth); | 215 FX_FLOAT fWidth); |
212 static void DrawBorder(CFX_RenderDevice* pDevice, | 216 static void DrawBorder(CFX_RenderDevice* pDevice, |
213 CFX_Matrix* pUser2Device, | 217 CFX_Matrix* pUser2Device, |
214 const CPDF_Rect& rect, | 218 const CFX_FloatRect& rect, |
215 FX_FLOAT fWidth, | 219 FX_FLOAT fWidth, |
216 const CPWL_Color& color, | 220 const CPWL_Color& color, |
217 const CPWL_Color& crLeftTop, | 221 const CPWL_Color& crLeftTop, |
218 const CPWL_Color& crRightBottom, | 222 const CPWL_Color& crRightBottom, |
219 int32_t nStyle, | 223 int32_t nStyle, |
220 int32_t nTransparancy); | 224 int32_t nTransparancy); |
221 static void DrawFillArea(CFX_RenderDevice* pDevice, | 225 static void DrawFillArea(CFX_RenderDevice* pDevice, |
222 CFX_Matrix* pUser2Device, | 226 CFX_Matrix* pUser2Device, |
223 const CPDF_Point* pPts, | 227 const CFX_FloatPoint* pPts, |
224 int32_t nCount, | 228 int32_t nCount, |
225 const FX_COLORREF& color); | 229 const FX_COLORREF& color); |
226 static void DrawShadow(CFX_RenderDevice* pDevice, | 230 static void DrawShadow(CFX_RenderDevice* pDevice, |
227 CFX_Matrix* pUser2Device, | 231 CFX_Matrix* pUser2Device, |
228 FX_BOOL bVertical, | 232 FX_BOOL bVertical, |
229 FX_BOOL bHorizontal, | 233 FX_BOOL bHorizontal, |
230 CPDF_Rect rect, | 234 CFX_FloatRect rect, |
231 int32_t nTransparancy, | 235 int32_t nTransparancy, |
232 int32_t nStartGray, | 236 int32_t nStartGray, |
233 int32_t nEndGray); | 237 int32_t nEndGray); |
234 static void DrawEditSpellCheck(CFX_RenderDevice* pDevice, | 238 static void DrawEditSpellCheck(CFX_RenderDevice* pDevice, |
235 CFX_Matrix* pUser2Device, | 239 CFX_Matrix* pUser2Device, |
236 IFX_Edit* pEdit, | 240 IFX_Edit* pEdit, |
237 const CPDF_Rect& rcClip, | 241 const CFX_FloatRect& rcClip, |
238 const CPDF_Point& ptOffset, | 242 const CFX_FloatPoint& ptOffset, |
239 const CPVT_WordRange* pRange, | 243 const CPVT_WordRange* pRange, |
240 IPWL_SpellCheck* pSpellCheck); | 244 IPWL_SpellCheck* pSpellCheck); |
241 | 245 |
242 public: | 246 public: |
243 static void ConvertCMYK2RGB(FX_FLOAT dC, | 247 static void ConvertCMYK2RGB(FX_FLOAT dC, |
244 FX_FLOAT dM, | 248 FX_FLOAT dM, |
245 FX_FLOAT dY, | 249 FX_FLOAT dY, |
246 FX_FLOAT dK, | 250 FX_FLOAT dK, |
247 FX_FLOAT& dR, | 251 FX_FLOAT& dR, |
248 FX_FLOAT& dG, | 252 FX_FLOAT& dG, |
(...skipping 28 matching lines...) Expand all Loading... |
277 | 281 |
278 static void PWLColorToARGB(const CPWL_Color& color, | 282 static void PWLColorToARGB(const CPWL_Color& color, |
279 int32_t& alpha, | 283 int32_t& alpha, |
280 FX_FLOAT& red, | 284 FX_FLOAT& red, |
281 FX_FLOAT& green, | 285 FX_FLOAT& green, |
282 FX_FLOAT& blue); | 286 FX_FLOAT& blue); |
283 | 287 |
284 public: | 288 public: |
285 static CFX_ByteString GetIconAppStream( | 289 static CFX_ByteString GetIconAppStream( |
286 int32_t nType, | 290 int32_t nType, |
287 const CPDF_Rect& rect, | 291 const CFX_FloatRect& rect, |
288 const CPWL_Color& crFill, | 292 const CPWL_Color& crFill, |
289 const CPWL_Color& crStroke = PWL_DEFAULT_BLACKCOLOR); | 293 const CPWL_Color& crStroke = PWL_DEFAULT_BLACKCOLOR); |
290 static void DrawIconAppStream(CFX_RenderDevice* pDevice, | 294 static void DrawIconAppStream(CFX_RenderDevice* pDevice, |
291 CFX_Matrix* pUser2Device, | 295 CFX_Matrix* pUser2Device, |
292 int32_t nType, | 296 int32_t nType, |
293 const CPDF_Rect& rect, | 297 const CFX_FloatRect& rect, |
294 const CPWL_Color& crFill, | 298 const CPWL_Color& crFill, |
295 const CPWL_Color& crStroke, | 299 const CPWL_Color& crStroke, |
296 const int32_t nTransparancy); | 300 const int32_t nTransparancy); |
297 | 301 |
298 private: | 302 private: |
299 static CFX_ByteString GetAppStreamFromArray(const CPWL_PathData* pPathData, | 303 static CFX_ByteString GetAppStreamFromArray(const CPWL_PathData* pPathData, |
300 int32_t nCount); | 304 int32_t nCount); |
301 static void GetPathDataFromArray(CFX_PathData& path, | 305 static void GetPathDataFromArray(CFX_PathData& path, |
302 const CPWL_PathData* pPathData, | 306 const CPWL_PathData* pPathData, |
303 int32_t nCount); | 307 int32_t nCount); |
304 | 308 |
305 static CFX_ByteString GetAppStream_Check(const CPDF_Rect& rcBBox, | 309 static CFX_ByteString GetAppStream_Check(const CFX_FloatRect& rcBBox, |
306 const CPWL_Color& crText); | 310 const CPWL_Color& crText); |
307 static CFX_ByteString GetAppStream_Circle(const CPDF_Rect& rcBBox, | 311 static CFX_ByteString GetAppStream_Circle(const CFX_FloatRect& rcBBox, |
308 const CPWL_Color& crText); | 312 const CPWL_Color& crText); |
309 static CFX_ByteString GetAppStream_Cross(const CPDF_Rect& rcBBox, | 313 static CFX_ByteString GetAppStream_Cross(const CFX_FloatRect& rcBBox, |
310 const CPWL_Color& crText); | 314 const CPWL_Color& crText); |
311 static CFX_ByteString GetAppStream_Diamond(const CPDF_Rect& rcBBox, | 315 static CFX_ByteString GetAppStream_Diamond(const CFX_FloatRect& rcBBox, |
312 const CPWL_Color& crText); | 316 const CPWL_Color& crText); |
313 static CFX_ByteString GetAppStream_Square(const CPDF_Rect& rcBBox, | 317 static CFX_ByteString GetAppStream_Square(const CFX_FloatRect& rcBBox, |
314 const CPWL_Color& crText); | 318 const CPWL_Color& crText); |
315 static CFX_ByteString GetAppStream_Star(const CPDF_Rect& rcBBox, | 319 static CFX_ByteString GetAppStream_Star(const CFX_FloatRect& rcBBox, |
316 const CPWL_Color& crText); | 320 const CPWL_Color& crText); |
317 | 321 |
318 static CFX_ByteString GetAP_Check(const CPDF_Rect& crBBox); | 322 static CFX_ByteString GetAP_Check(const CFX_FloatRect& crBBox); |
319 static CFX_ByteString GetAP_Circle(const CPDF_Rect& crBBox); | 323 static CFX_ByteString GetAP_Circle(const CFX_FloatRect& crBBox); |
320 static CFX_ByteString GetAP_Cross(const CPDF_Rect& crBBox); | 324 static CFX_ByteString GetAP_Cross(const CFX_FloatRect& crBBox); |
321 static CFX_ByteString GetAP_Diamond(const CPDF_Rect& crBBox); | 325 static CFX_ByteString GetAP_Diamond(const CFX_FloatRect& crBBox); |
322 static CFX_ByteString GetAP_Square(const CPDF_Rect& crBBox); | 326 static CFX_ByteString GetAP_Square(const CFX_FloatRect& crBBox); |
323 static CFX_ByteString GetAP_Star(const CPDF_Rect& crBBox); | 327 static CFX_ByteString GetAP_Star(const CFX_FloatRect& crBBox); |
324 static CFX_ByteString GetAP_HalfCircle(const CPDF_Rect& crBBox, | 328 static CFX_ByteString GetAP_HalfCircle(const CFX_FloatRect& crBBox, |
325 FX_FLOAT fRotate); | 329 FX_FLOAT fRotate); |
326 | 330 |
327 static void GetGraphics_Checkmark(CFX_ByteString& sPathData, | 331 static void GetGraphics_Checkmark(CFX_ByteString& sPathData, |
328 CFX_PathData& path, | 332 CFX_PathData& path, |
329 const CPDF_Rect& crBBox, | 333 const CFX_FloatRect& crBBox, |
330 const PWL_PATH_TYPE type); | 334 const PWL_PATH_TYPE type); |
331 static void GetGraphics_Circle(CFX_ByteString& sPathData, | 335 static void GetGraphics_Circle(CFX_ByteString& sPathData, |
332 CFX_PathData& path, | 336 CFX_PathData& path, |
333 const CPDF_Rect& crBBox, | 337 const CFX_FloatRect& crBBox, |
334 const PWL_PATH_TYPE type); | 338 const PWL_PATH_TYPE type); |
335 static void GetGraphics_Comment(CFX_ByteString& sPathData, | 339 static void GetGraphics_Comment(CFX_ByteString& sPathData, |
336 CFX_PathData& path, | 340 CFX_PathData& path, |
337 const CPDF_Rect& crBBox, | 341 const CFX_FloatRect& crBBox, |
338 const PWL_PATH_TYPE type); | 342 const PWL_PATH_TYPE type); |
339 static void GetGraphics_Cross(CFX_ByteString& sPathData, | 343 static void GetGraphics_Cross(CFX_ByteString& sPathData, |
340 CFX_PathData& path, | 344 CFX_PathData& path, |
341 const CPDF_Rect& crBBox, | 345 const CFX_FloatRect& crBBox, |
342 const PWL_PATH_TYPE type); | 346 const PWL_PATH_TYPE type); |
343 static void GetGraphics_Help(CFX_ByteString& sPathData, | 347 static void GetGraphics_Help(CFX_ByteString& sPathData, |
344 CFX_PathData& path, | 348 CFX_PathData& path, |
345 const CPDF_Rect& crBBox, | 349 const CFX_FloatRect& crBBox, |
346 const PWL_PATH_TYPE type); | 350 const PWL_PATH_TYPE type); |
347 static void GetGraphics_InsertText(CFX_ByteString& sPathData, | 351 static void GetGraphics_InsertText(CFX_ByteString& sPathData, |
348 CFX_PathData& path, | 352 CFX_PathData& path, |
349 const CPDF_Rect& crBBox, | 353 const CFX_FloatRect& crBBox, |
350 const PWL_PATH_TYPE type); | 354 const PWL_PATH_TYPE type); |
351 static void GetGraphics_Key(CFX_ByteString& sPathData, | 355 static void GetGraphics_Key(CFX_ByteString& sPathData, |
352 CFX_PathData& path, | 356 CFX_PathData& path, |
353 const CPDF_Rect& crBBox, | 357 const CFX_FloatRect& crBBox, |
354 const PWL_PATH_TYPE type); | 358 const PWL_PATH_TYPE type); |
355 static void GetGraphics_NewParagraph(CFX_ByteString& sPathData, | 359 static void GetGraphics_NewParagraph(CFX_ByteString& sPathData, |
356 CFX_PathData& path, | 360 CFX_PathData& path, |
357 const CPDF_Rect& crBBox, | 361 const CFX_FloatRect& crBBox, |
358 const PWL_PATH_TYPE type); | 362 const PWL_PATH_TYPE type); |
359 static void GetGraphics_TextNote(CFX_ByteString& sPathData, | 363 static void GetGraphics_TextNote(CFX_ByteString& sPathData, |
360 CFX_PathData& path, | 364 CFX_PathData& path, |
361 const CPDF_Rect& crBBox, | 365 const CFX_FloatRect& crBBox, |
362 const PWL_PATH_TYPE type); | 366 const PWL_PATH_TYPE type); |
363 static void GetGraphics_Paragraph(CFX_ByteString& sPathData, | 367 static void GetGraphics_Paragraph(CFX_ByteString& sPathData, |
364 CFX_PathData& path, | 368 CFX_PathData& path, |
365 const CPDF_Rect& crBBox, | 369 const CFX_FloatRect& crBBox, |
366 const PWL_PATH_TYPE type); | 370 const PWL_PATH_TYPE type); |
367 static void GetGraphics_RightArrow(CFX_ByteString& sPathData, | 371 static void GetGraphics_RightArrow(CFX_ByteString& sPathData, |
368 CFX_PathData& path, | 372 CFX_PathData& path, |
369 const CPDF_Rect& crBBox, | 373 const CFX_FloatRect& crBBox, |
370 const PWL_PATH_TYPE type); | 374 const PWL_PATH_TYPE type); |
371 static void GetGraphics_RightPointer(CFX_ByteString& sPathData, | 375 static void GetGraphics_RightPointer(CFX_ByteString& sPathData, |
372 CFX_PathData& path, | 376 CFX_PathData& path, |
373 const CPDF_Rect& crBBox, | 377 const CFX_FloatRect& crBBox, |
374 const PWL_PATH_TYPE type); | 378 const PWL_PATH_TYPE type); |
375 static void GetGraphics_Star(CFX_ByteString& sPathData, | 379 static void GetGraphics_Star(CFX_ByteString& sPathData, |
376 CFX_PathData& path, | 380 CFX_PathData& path, |
377 const CPDF_Rect& crBBox, | 381 const CFX_FloatRect& crBBox, |
378 const PWL_PATH_TYPE type); | 382 const PWL_PATH_TYPE type); |
379 static void GetGraphics_UpArrow(CFX_ByteString& sPathData, | 383 static void GetGraphics_UpArrow(CFX_ByteString& sPathData, |
380 CFX_PathData& path, | 384 CFX_PathData& path, |
381 const CPDF_Rect& crBBox, | 385 const CFX_FloatRect& crBBox, |
382 const PWL_PATH_TYPE type); | 386 const PWL_PATH_TYPE type); |
383 static void GetGraphics_UpLeftArrow(CFX_ByteString& sPathData, | 387 static void GetGraphics_UpLeftArrow(CFX_ByteString& sPathData, |
384 CFX_PathData& path, | 388 CFX_PathData& path, |
385 const CPDF_Rect& crBBox, | 389 const CFX_FloatRect& crBBox, |
386 const PWL_PATH_TYPE type); | 390 const PWL_PATH_TYPE type); |
387 static void GetGraphics_Graph(CFX_ByteString& sPathData, | 391 static void GetGraphics_Graph(CFX_ByteString& sPathData, |
388 CFX_PathData& path, | 392 CFX_PathData& path, |
389 const CPDF_Rect& crBBox, | 393 const CFX_FloatRect& crBBox, |
390 const PWL_PATH_TYPE type); | 394 const PWL_PATH_TYPE type); |
391 static void GetGraphics_Paperclip(CFX_ByteString& sPathData, | 395 static void GetGraphics_Paperclip(CFX_ByteString& sPathData, |
392 CFX_PathData& path, | 396 CFX_PathData& path, |
393 const CPDF_Rect& crBBox, | 397 const CFX_FloatRect& crBBox, |
394 const PWL_PATH_TYPE type); | 398 const PWL_PATH_TYPE type); |
395 static void GetGraphics_Attachment(CFX_ByteString& sPathData, | 399 static void GetGraphics_Attachment(CFX_ByteString& sPathData, |
396 CFX_PathData& path, | 400 CFX_PathData& path, |
397 const CPDF_Rect& crBBox, | 401 const CFX_FloatRect& crBBox, |
398 const PWL_PATH_TYPE type); | 402 const PWL_PATH_TYPE type); |
399 static void GetGraphics_Tag(CFX_ByteString& sPathData, | 403 static void GetGraphics_Tag(CFX_ByteString& sPathData, |
400 CFX_PathData& path, | 404 CFX_PathData& path, |
401 const CPDF_Rect& crBBox, | 405 const CFX_FloatRect& crBBox, |
402 const PWL_PATH_TYPE type); | 406 const PWL_PATH_TYPE type); |
403 static void GetGraphics_Foxit(CFX_ByteString& sPathData, | 407 static void GetGraphics_Foxit(CFX_ByteString& sPathData, |
404 CFX_PathData& path, | 408 CFX_PathData& path, |
405 const CPDF_Rect& crBBox, | 409 const CFX_FloatRect& crBBox, |
406 const PWL_PATH_TYPE type); | 410 const PWL_PATH_TYPE type); |
407 }; | 411 }; |
408 | 412 |
409 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_UTILS_H_ | 413 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_UTILS_H_ |
OLD | NEW |