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_font.h" | 7 #include "xfa/fxfa/parser/cxfa_font.h" |
8 | 8 |
9 #include "core/fxge/include/fx_dib.h" | 9 #include "core/fxge/fx_dib.h" |
10 #include "xfa/fxfa/parser/cxfa_fill.h" | 10 #include "xfa/fxfa/parser/cxfa_fill.h" |
11 #include "xfa/fxfa/parser/cxfa_measurement.h" | 11 #include "xfa/fxfa/parser/cxfa_measurement.h" |
12 #include "xfa/fxfa/parser/xfa_object.h" | 12 #include "xfa/fxfa/parser/xfa_object.h" |
13 | 13 |
14 CXFA_Font::CXFA_Font(CXFA_Node* pNode) : CXFA_Data(pNode) {} | 14 CXFA_Font::CXFA_Font(CXFA_Node* pNode) : CXFA_Data(pNode) {} |
15 | 15 |
16 FX_FLOAT CXFA_Font::GetBaselineShift() { | 16 FX_FLOAT CXFA_Font::GetBaselineShift() { |
17 return m_pNode->GetMeasure(XFA_ATTRIBUTE_BaselineShift).ToUnit(XFA_UNIT_Pt); | 17 return m_pNode->GetMeasure(XFA_ATTRIBUTE_BaselineShift).ToUnit(XFA_UNIT_Pt); |
18 } | 18 } |
19 | 19 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 void CXFA_Font::SetColor(FX_ARGB color) { | 85 void CXFA_Font::SetColor(FX_ARGB color) { |
86 CXFA_Fill fill(m_pNode->GetProperty(0, XFA_Element::Fill)); | 86 CXFA_Fill fill(m_pNode->GetProperty(0, XFA_Element::Fill)); |
87 fill.SetColor(color); | 87 fill.SetColor(color); |
88 } | 88 } |
89 | 89 |
90 FX_ARGB CXFA_Font::GetColor() { | 90 FX_ARGB CXFA_Font::GetColor() { |
91 CXFA_Fill fill(m_pNode->GetChild(0, XFA_Element::Fill)); | 91 CXFA_Fill fill(m_pNode->GetChild(0, XFA_Element::Fill)); |
92 return fill ? fill.GetColor(TRUE) : 0xFF000000; | 92 return fill ? fill.GetColor(TRUE) : 0xFF000000; |
93 } | 93 } |
OLD | NEW |