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 CORE_INCLUDE_FPDFDOC_FPDF_AP_H_ | 7 #ifndef CORE_INCLUDE_FPDFDOC_FPDF_AP_H_ |
8 #define CORE_INCLUDE_FPDFDOC_FPDF_AP_H_ | 8 #define CORE_INCLUDE_FPDFDOC_FPDF_AP_H_ |
9 | 9 |
10 #include "core/include/fpdfapi/fpdf_parser.h" | 10 #include "core/include/fpdfapi/fpdf_parser.h" |
11 #include "fpdf_vt.h" | 11 #include "fpdf_vt.h" |
12 | 12 |
13 class IPVT_FontMap { | 13 class IPVT_FontMap { |
14 public: | 14 public: |
15 virtual ~IPVT_FontMap() {} | 15 virtual ~IPVT_FontMap() {} |
16 virtual CPDF_Font* GetPDFFont(int32_t nFontIndex) = 0; | 16 virtual CPDF_Font* GetPDFFont(int32_t nFontIndex) = 0; |
17 virtual CFX_ByteString GetPDFFontAlias(int32_t nFontIndex) = 0; | 17 virtual CFX_ByteString GetPDFFontAlias(int32_t nFontIndex) = 0; |
18 }; | 18 }; |
19 | 19 |
20 struct CPVT_Dash { | 20 struct CPVT_Dash { |
21 CPVT_Dash(int32_t dash, int32_t gap, int32_t phase) | 21 CPVT_Dash(int32_t dash, int32_t gap, int32_t phase) |
22 : nDash(dash), nGap(gap), nPhase(phase) {} | 22 : nDash(dash), nGap(gap), nPhase(phase) {} |
23 | 23 |
24 int32_t nDash; | 24 int32_t nDash; |
25 int32_t nGap; | 25 int32_t nGap; |
26 int32_t nPhase; | 26 int32_t nPhase; |
27 }; | 27 }; |
28 | 28 |
29 struct CPVT_Color { | 29 struct CPVT_Color { |
30 enum Type { TRANSPARENT = 0, GRAY, RGB, CMYK }; | 30 enum Type { kTransparent = 0, kGray, kRGB, kCMYK }; |
31 | 31 |
32 CPVT_Color(Type type = TRANSPARENT, | 32 CPVT_Color(Type type = kTransparent, |
33 FX_FLOAT color1 = 0.0f, | 33 FX_FLOAT color1 = 0.0f, |
34 FX_FLOAT color2 = 0.0f, | 34 FX_FLOAT color2 = 0.0f, |
35 FX_FLOAT color3 = 0.0f, | 35 FX_FLOAT color3 = 0.0f, |
36 FX_FLOAT color4 = 0.0f) | 36 FX_FLOAT color4 = 0.0f) |
37 : nColorType(type), | 37 : nColorType(type), |
38 fColor1(color1), | 38 fColor1(color1), |
39 fColor2(color2), | 39 fColor2(color2), |
40 fColor3(color3), | 40 fColor3(color3), |
41 fColor4(color4) {} | 41 fColor4(color4) {} |
42 | 42 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 const CPVT_Color& crLeftTop, | 92 const CPVT_Color& crLeftTop, |
93 const CPVT_Color& crRightBottom, | 93 const CPVT_Color& crRightBottom, |
94 int32_t nStyle, | 94 int32_t nStyle, |
95 const CPVT_Dash& dash); | 95 const CPVT_Dash& dash); |
96 | 96 |
97 static CFX_ByteString GenerateColorAP(const CPVT_Color& color, | 97 static CFX_ByteString GenerateColorAP(const CPVT_Color& color, |
98 const FX_BOOL& bFillOrStroke); | 98 const FX_BOOL& bFillOrStroke); |
99 }; | 99 }; |
100 | 100 |
101 #endif // CORE_INCLUDE_FPDFDOC_FPDF_AP_H_ | 101 #endif // CORE_INCLUDE_FPDFDOC_FPDF_AP_H_ |
OLD | NEW |