| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 "xfa/fxfa/parser/cxfa_fill.h" | 7 #include "xfa/fxfa/parser/cxfa_fill.h" |
| 8 | 8 |
| 9 #include "xfa/fxfa/parser/xfa_object.h" | 9 #include "xfa/fxfa/parser/xfa_object.h" |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 return CXFA_Data::ToColor(wsColor); | 32 return CXFA_Data::ToColor(wsColor); |
| 33 } | 33 } |
| 34 if (bText) | 34 if (bText) |
| 35 return 0xFF000000; | 35 return 0xFF000000; |
| 36 return 0xFFFFFFFF; | 36 return 0xFFFFFFFF; |
| 37 } | 37 } |
| 38 | 38 |
| 39 XFA_Element CXFA_Fill::GetFillType() { | 39 XFA_Element CXFA_Fill::GetFillType() { |
| 40 CXFA_Node* pChild = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild); | 40 CXFA_Node* pChild = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild); |
| 41 while (pChild) { | 41 while (pChild) { |
| 42 XFA_Element eType = pChild->GetClassID(); | 42 XFA_Element eType = pChild->GetElementType(); |
| 43 if (eType != XFA_Element::Color && eType != XFA_Element::Extras) | 43 if (eType != XFA_Element::Color && eType != XFA_Element::Extras) |
| 44 return eType; | 44 return eType; |
| 45 | 45 |
| 46 pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling); | 46 pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling); |
| 47 } | 47 } |
| 48 return XFA_Element::Solid; | 48 return XFA_Element::Solid; |
| 49 } | 49 } |
| 50 | 50 |
| 51 int32_t CXFA_Fill::GetPattern(FX_ARGB& foreColor) { | 51 int32_t CXFA_Fill::GetPattern(FX_ARGB& foreColor) { |
| 52 CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Pattern); | 52 CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Pattern); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 pNode->TryEnum(XFA_ATTRIBUTE_Type, eAttr); | 94 pNode->TryEnum(XFA_ATTRIBUTE_Type, eAttr); |
| 95 if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) { | 95 if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) { |
| 96 CFX_WideStringC wsColor; | 96 CFX_WideStringC wsColor; |
| 97 pColor->TryCData(XFA_ATTRIBUTE_Value, wsColor, FALSE); | 97 pColor->TryCData(XFA_ATTRIBUTE_Value, wsColor, FALSE); |
| 98 endColor = CXFA_Data::ToColor(wsColor); | 98 endColor = CXFA_Data::ToColor(wsColor); |
| 99 } else { | 99 } else { |
| 100 endColor = 0xFF000000; | 100 endColor = 0xFF000000; |
| 101 } | 101 } |
| 102 return eAttr; | 102 return eAttr; |
| 103 } | 103 } |
| OLD | NEW |