| 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 #include "../../include/javascript/JavaScript.h" | 7 #include "../../include/javascript/JavaScript.h" |
| 8 #include "../../include/javascript/IJavaScript.h" | 8 #include "../../include/javascript/IJavaScript.h" |
| 9 #include "../../include/javascript/JS_Define.h" | 9 #include "../../include/javascript/JS_Define.h" |
| 10 #include "../../include/javascript/JS_Object.h" | 10 #include "../../include/javascript/JS_Object.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 JS_STATIC_PROP_ENTRY(green) | 38 JS_STATIC_PROP_ENTRY(green) |
| 39 JS_STATIC_PROP_ENTRY(ltGray) | 39 JS_STATIC_PROP_ENTRY(ltGray) |
| 40 JS_STATIC_PROP_ENTRY(magenta) | 40 JS_STATIC_PROP_ENTRY(magenta) |
| 41 JS_STATIC_PROP_ENTRY(red) | 41 JS_STATIC_PROP_ENTRY(red) |
| 42 JS_STATIC_PROP_ENTRY(transparent) | 42 JS_STATIC_PROP_ENTRY(transparent) |
| 43 JS_STATIC_PROP_ENTRY(white) | 43 JS_STATIC_PROP_ENTRY(white) |
| 44 JS_STATIC_PROP_ENTRY(yellow) | 44 JS_STATIC_PROP_ENTRY(yellow) |
| 45 END_JS_STATIC_PROP() | 45 END_JS_STATIC_PROP() |
| 46 | 46 |
| 47 BEGIN_JS_STATIC_METHOD(CJS_Color) | 47 BEGIN_JS_STATIC_METHOD(CJS_Color) |
| 48 » JS_STATIC_METHOD_ENTRY(convert, 2) | 48 » JS_STATIC_METHOD_ENTRY(convert) |
| 49 » JS_STATIC_METHOD_ENTRY(equal, 2) | 49 » JS_STATIC_METHOD_ENTRY(equal) |
| 50 END_JS_STATIC_METHOD() | 50 END_JS_STATIC_METHOD() |
| 51 | 51 |
| 52 IMPLEMENT_JS_CLASS(CJS_Color,color) | 52 IMPLEMENT_JS_CLASS(CJS_Color,color) |
| 53 | 53 |
| 54 color::color(CJS_Object* pJSObject): CJS_EmbedObj(pJSObject) | 54 color::color(CJS_Object* pJSObject): CJS_EmbedObj(pJSObject) |
| 55 { | 55 { |
| 56 m_crTransparent = CPWL_Color(COLORTYPE_TRANSPARENT); | 56 m_crTransparent = CPWL_Color(COLORTYPE_TRANSPARENT); |
| 57 m_crBlack = CPWL_Color(COLORTYPE_GRAY, 0); | 57 m_crBlack = CPWL_Color(COLORTYPE_GRAY, 0); |
| 58 m_crWhite = CPWL_Color(COLORTYPE_GRAY, 1); | 58 m_crWhite = CPWL_Color(COLORTYPE_GRAY, 1); |
| 59 m_crRed = CPWL_Color(COLORTYPE_RGB, 1, 0 ,0); | 59 m_crRed = CPWL_Color(COLORTYPE_RGB, 1, 0 ,0); |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 242 |
| 243 ConvertArrayToPWLColor(array1, color1); | 243 ConvertArrayToPWLColor(array1, color1); |
| 244 ConvertArrayToPWLColor(array2, color2); | 244 ConvertArrayToPWLColor(array2, color2); |
| 245 | 245 |
| 246 color1.ConvertColorType(color2.nColorType); | 246 color1.ConvertColorType(color2.nColorType); |
| 247 | 247 |
| 248 vRet = color1 == color2; | 248 vRet = color1 == color2; |
| 249 return TRUE; | 249 return TRUE; |
| 250 } | 250 } |
| 251 | 251 |
| OLD | NEW |