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_JAVASCRIPT_COLOR_H_ | 7 #ifndef FPDFSDK_JAVASCRIPT_COLOR_H_ |
8 #define FPDFSDK_JAVASCRIPT_COLOR_H_ | 8 #define FPDFSDK_JAVASCRIPT_COLOR_H_ |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 FX_BOOL convert(IJS_Context* cc, | 35 FX_BOOL convert(IJS_Context* cc, |
36 const std::vector<CJS_Value>& params, | 36 const std::vector<CJS_Value>& params, |
37 CJS_Value& vRet, | 37 CJS_Value& vRet, |
38 CFX_WideString& sError); | 38 CFX_WideString& sError); |
39 FX_BOOL equal(IJS_Context* cc, | 39 FX_BOOL equal(IJS_Context* cc, |
40 const std::vector<CJS_Value>& params, | 40 const std::vector<CJS_Value>& params, |
41 CJS_Value& vRet, | 41 CJS_Value& vRet, |
42 CFX_WideString& sError); | 42 CFX_WideString& sError); |
43 | 43 |
44 public: | 44 static void ConvertPWLColorToArray(CJS_Runtime* pRuntime, |
45 static void ConvertPWLColorToArray(const CPWL_Color& color, CJS_Array& array); | 45 const CPWL_Color& color, |
46 static void ConvertArrayToPWLColor(CJS_Array& array, CPWL_Color& color); | 46 CJS_Array* array); |
| 47 static void ConvertArrayToPWLColor(CJS_Runtime* pRuntime, |
| 48 const CJS_Array& array, |
| 49 CPWL_Color* color); |
47 | 50 |
48 private: | 51 private: |
49 CPWL_Color m_crTransparent; | 52 CPWL_Color m_crTransparent; |
50 CPWL_Color m_crBlack; | 53 CPWL_Color m_crBlack; |
51 CPWL_Color m_crWhite; | 54 CPWL_Color m_crWhite; |
52 CPWL_Color m_crRed; | 55 CPWL_Color m_crRed; |
53 CPWL_Color m_crGreen; | 56 CPWL_Color m_crGreen; |
54 CPWL_Color m_crBlue; | 57 CPWL_Color m_crBlue; |
55 CPWL_Color m_crCyan; | 58 CPWL_Color m_crCyan; |
56 CPWL_Color m_crMagenta; | 59 CPWL_Color m_crMagenta; |
(...skipping 21 matching lines...) Expand all Loading... |
78 JS_STATIC_PROP(red, color); | 81 JS_STATIC_PROP(red, color); |
79 JS_STATIC_PROP(transparent, color); | 82 JS_STATIC_PROP(transparent, color); |
80 JS_STATIC_PROP(white, color); | 83 JS_STATIC_PROP(white, color); |
81 JS_STATIC_PROP(yellow, color); | 84 JS_STATIC_PROP(yellow, color); |
82 | 85 |
83 JS_STATIC_METHOD(convert, color); | 86 JS_STATIC_METHOD(convert, color); |
84 JS_STATIC_METHOD(equal, color); | 87 JS_STATIC_METHOD(equal, color); |
85 }; | 88 }; |
86 | 89 |
87 #endif // FPDFSDK_JAVASCRIPT_COLOR_H_ | 90 #endif // FPDFSDK_JAVASCRIPT_COLOR_H_ |
OLD | NEW |