| 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_PDFWINDOW_PWL_UTILS_H_ | 7 #ifndef FPDFSDK_PDFWINDOW_PWL_UTILS_H_ |
| 8 #define FPDFSDK_PDFWINDOW_PWL_UTILS_H_ | 8 #define FPDFSDK_PDFWINDOW_PWL_UTILS_H_ |
| 9 | 9 |
| 10 #include "core/fpdfdoc/include/cpvt_wordrange.h" | 10 #include "core/fpdfdoc/include/cpvt_wordrange.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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; | |
| 104 | |
| 105 class CPWL_Utils { | 103 class CPWL_Utils { |
| 106 public: | 104 public: |
| 107 static CFX_FloatRect InflateRect(const CFX_FloatRect& rcRect, FX_FLOAT fSize); | 105 static CFX_FloatRect InflateRect(const CFX_FloatRect& rcRect, FX_FLOAT fSize); |
| 108 static CFX_FloatRect DeflateRect(const CFX_FloatRect& rcRect, FX_FLOAT fSize); | 106 static CFX_FloatRect DeflateRect(const CFX_FloatRect& rcRect, FX_FLOAT fSize); |
| 109 static FX_BOOL IntersectRect(const CFX_FloatRect& rect1, | 107 static FX_BOOL IntersectRect(const CFX_FloatRect& rect1, |
| 110 const CFX_FloatRect& rect2); | 108 const CFX_FloatRect& rect2); |
| 111 static FX_BOOL ContainsRect(const CFX_FloatRect& rcParent, | 109 static FX_BOOL ContainsRect(const CFX_FloatRect& rcParent, |
| 112 const CFX_FloatRect& rcChild); | 110 const CFX_FloatRect& rcChild); |
| 113 static CFX_FloatRect ScaleRect(const CFX_FloatRect& rcRect, FX_FLOAT fScale); | 111 static CFX_FloatRect ScaleRect(const CFX_FloatRect& rcRect, FX_FLOAT fScale); |
| 114 static CPVT_WordRange OverlapWordRange(const CPVT_WordRange& wr1, | 112 static CPVT_WordRange OverlapWordRange(const CPVT_WordRange& wr1, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 168 |
| 171 static CFX_ByteString GetEditAppStream(IFX_Edit* pEdit, | 169 static CFX_ByteString GetEditAppStream(IFX_Edit* pEdit, |
| 172 const CFX_FloatPoint& ptOffset, | 170 const CFX_FloatPoint& ptOffset, |
| 173 const CPVT_WordRange* pRange = NULL, | 171 const CPVT_WordRange* pRange = NULL, |
| 174 FX_BOOL bContinuous = TRUE, | 172 FX_BOOL bContinuous = TRUE, |
| 175 uint16_t SubWord = 0); | 173 uint16_t SubWord = 0); |
| 176 static CFX_ByteString GetEditSelAppStream( | 174 static CFX_ByteString GetEditSelAppStream( |
| 177 IFX_Edit* pEdit, | 175 IFX_Edit* pEdit, |
| 178 const CFX_FloatPoint& ptOffset, | 176 const CFX_FloatPoint& ptOffset, |
| 179 const CPVT_WordRange* pRange = NULL); | 177 const CPVT_WordRange* pRange = NULL); |
| 180 static CFX_ByteString GetSpellCheckAppStream( | |
| 181 IFX_Edit* pEdit, | |
| 182 IPWL_SpellCheck* pSpellCheck, | |
| 183 const CFX_FloatPoint& ptOffset, | |
| 184 const CPVT_WordRange* pRange = NULL); | |
| 185 static CFX_ByteString GetTextAppStream(const CFX_FloatRect& rcBBox, | 178 static CFX_ByteString GetTextAppStream(const CFX_FloatRect& rcBBox, |
| 186 IPVT_FontMap* pFontMap, | 179 IPVT_FontMap* pFontMap, |
| 187 const CFX_WideString& sText, | 180 const CFX_WideString& sText, |
| 188 int32_t nAlignmentH, | 181 int32_t nAlignmentH, |
| 189 int32_t nAlignmentV, | 182 int32_t nAlignmentV, |
| 190 FX_FLOAT fFontSize, | 183 FX_FLOAT fFontSize, |
| 191 FX_BOOL bMultiLine, | 184 FX_BOOL bMultiLine, |
| 192 FX_BOOL bAutoReturn, | 185 FX_BOOL bAutoReturn, |
| 193 const CPWL_Color& crText); | 186 const CPWL_Color& crText); |
| 194 static CFX_ByteString GetDropButtonAppStream(const CFX_FloatRect& rcBBox); | 187 static CFX_ByteString GetDropButtonAppStream(const CFX_FloatRect& rcBBox); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 int32_t nCount, | 221 int32_t nCount, |
| 229 const FX_COLORREF& color); | 222 const FX_COLORREF& color); |
| 230 static void DrawShadow(CFX_RenderDevice* pDevice, | 223 static void DrawShadow(CFX_RenderDevice* pDevice, |
| 231 CFX_Matrix* pUser2Device, | 224 CFX_Matrix* pUser2Device, |
| 232 FX_BOOL bVertical, | 225 FX_BOOL bVertical, |
| 233 FX_BOOL bHorizontal, | 226 FX_BOOL bHorizontal, |
| 234 CFX_FloatRect rect, | 227 CFX_FloatRect rect, |
| 235 int32_t nTransparancy, | 228 int32_t nTransparancy, |
| 236 int32_t nStartGray, | 229 int32_t nStartGray, |
| 237 int32_t nEndGray); | 230 int32_t nEndGray); |
| 238 static void DrawEditSpellCheck(CFX_RenderDevice* pDevice, | |
| 239 CFX_Matrix* pUser2Device, | |
| 240 IFX_Edit* pEdit, | |
| 241 const CFX_FloatRect& rcClip, | |
| 242 const CFX_FloatPoint& ptOffset, | |
| 243 const CPVT_WordRange* pRange, | |
| 244 IPWL_SpellCheck* pSpellCheck); | |
| 245 | 231 |
| 246 public: | 232 public: |
| 247 static void ConvertCMYK2RGB(FX_FLOAT dC, | 233 static void ConvertCMYK2RGB(FX_FLOAT dC, |
| 248 FX_FLOAT dM, | 234 FX_FLOAT dM, |
| 249 FX_FLOAT dY, | 235 FX_FLOAT dY, |
| 250 FX_FLOAT dK, | 236 FX_FLOAT dK, |
| 251 FX_FLOAT& dR, | 237 FX_FLOAT& dR, |
| 252 FX_FLOAT& dG, | 238 FX_FLOAT& dG, |
| 253 FX_FLOAT& dB); | 239 FX_FLOAT& dB); |
| 254 static void ConvertRGB2CMYK(FX_FLOAT dR, | 240 static void ConvertRGB2CMYK(FX_FLOAT dR, |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 CFX_PathData& path, | 390 CFX_PathData& path, |
| 405 const CFX_FloatRect& crBBox, | 391 const CFX_FloatRect& crBBox, |
| 406 const PWL_PATH_TYPE type); | 392 const PWL_PATH_TYPE type); |
| 407 static void GetGraphics_Foxit(CFX_ByteString& sPathData, | 393 static void GetGraphics_Foxit(CFX_ByteString& sPathData, |
| 408 CFX_PathData& path, | 394 CFX_PathData& path, |
| 409 const CFX_FloatRect& crBBox, | 395 const CFX_FloatRect& crBBox, |
| 410 const PWL_PATH_TYPE type); | 396 const PWL_PATH_TYPE type); |
| 411 }; | 397 }; |
| 412 | 398 |
| 413 #endif // FPDFSDK_PDFWINDOW_PWL_UTILS_H_ | 399 #endif // FPDFSDK_PDFWINDOW_PWL_UTILS_H_ |
| OLD | NEW |