| 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 _COLOR_H_ | 7 #ifndef _COLOR_H_ |
| 8 #define _COLOR_H_ | 8 #define _COLOR_H_ |
| 9 | 9 |
| 10 class color : public CJS_EmbedObj | 10 class color : public CJS_EmbedObj |
| 11 { | 11 { |
| 12 public: | 12 public: |
| 13 color(CJS_Object* pJSObject); | 13 color(CJS_Object* pJSObject); |
| 14 virtual ~color(void); | 14 virtual ~color(void); |
| 15 | 15 |
| 16 » FX_BOOL black(OBJ_PROP_PARAMS); | 16 » FX_BOOL black(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sErr
or); |
| 17 » FX_BOOL blue(OBJ_PROP_PARAMS); | 17 » FX_BOOL blue(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sErro
r); |
| 18 » FX_BOOL cyan(OBJ_PROP_PARAMS);» | 18 » FX_BOOL cyan(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sErro
r);» |
| 19 » FX_BOOL dkGray(OBJ_PROP_PARAMS); | 19 » FX_BOOL dkGray(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sEr
ror); |
| 20 » FX_BOOL gray(OBJ_PROP_PARAMS); | 20 » FX_BOOL gray(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sErro
r); |
| 21 » FX_BOOL green(OBJ_PROP_PARAMS); | 21 » FX_BOOL green(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sErr
or); |
| 22 » FX_BOOL ltGray(OBJ_PROP_PARAMS); | 22 » FX_BOOL ltGray(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sEr
ror); |
| 23 » FX_BOOL magenta(OBJ_PROP_PARAMS); | 23 » FX_BOOL magenta(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sE
rror); |
| 24 » FX_BOOL red(OBJ_PROP_PARAMS);» | 24 » FX_BOOL red(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sError
);» |
| 25 » FX_BOOL transparent(OBJ_PROP_PARAMS); | 25 » FX_BOOL transparent(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString
& sError); |
| 26 » FX_BOOL white(OBJ_PROP_PARAMS); | 26 » FX_BOOL white(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sErr
or); |
| 27 » FX_BOOL yellow(OBJ_PROP_PARAMS); | 27 » FX_BOOL yellow(IFXJS_Context* cc, CJS_PropValue& vp, JS_ErrorString& sEr
ror); |
| 28 | 28 |
| 29 » FX_BOOL convert(OBJ_METHOD_PARAMS); | 29 » FX_BOOL convert(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Val
ue& vRet, JS_ErrorString& sError); |
| 30 » FX_BOOL equal(OBJ_METHOD_PARAMS); | 30 » FX_BOOL equal(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value
& vRet, JS_ErrorString& sError); |
| 31 | 31 |
| 32 public: | 32 public: |
| 33 static void ConvertPWLColorToArray(const CPWL_Color& color,
CJS_Array& array); | 33 static void ConvertPWLColorToArray(const CPWL_Color& color,
CJS_Array& array); |
| 34 static void ConvertArrayToPWLColor(CJS_Array& array, CPWL_Co
lor& color); | 34 static void ConvertArrayToPWLColor(CJS_Array& array, CPWL_Co
lor& color); |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 CPWL_Color m_crTransparent; | 37 CPWL_Color m_crTransparent; |
| 38 CPWL_Color m_crBlack; | 38 CPWL_Color m_crBlack; |
| 39 CPWL_Color m_crWhite; | 39 CPWL_Color m_crWhite; |
| 40 CPWL_Color m_crRed; | 40 CPWL_Color m_crRed; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 69 JS_STATIC_PROP(white, color); | 69 JS_STATIC_PROP(white, color); |
| 70 JS_STATIC_PROP(yellow, color); | 70 JS_STATIC_PROP(yellow, color); |
| 71 | 71 |
| 72 JS_STATIC_METHOD(convert,color); | 72 JS_STATIC_METHOD(convert,color); |
| 73 JS_STATIC_METHOD(equal,color); | 73 JS_STATIC_METHOD(equal,color); |
| 74 | 74 |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 #endif //_COLOR_H_ | 77 #endif //_COLOR_H_ |
| 78 | 78 |
| OLD | NEW |