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_stroke.h" | 7 #include "xfa/fxfa/parser/cxfa_stroke.h" |
8 | 8 |
| 9 #include "xfa/fxfa/parser/cxfa_measurement.h" |
9 #include "xfa/fxfa/parser/xfa_object.h" | 10 #include "xfa/fxfa/parser/xfa_object.h" |
10 | 11 |
11 int32_t CXFA_Stroke::GetPresence() const { | 12 int32_t CXFA_Stroke::GetPresence() const { |
12 return m_pNode ? m_pNode->GetEnum(XFA_ATTRIBUTE_Presence) | 13 return m_pNode ? m_pNode->GetEnum(XFA_ATTRIBUTE_Presence) |
13 : XFA_ATTRIBUTEENUM_Invisible; | 14 : XFA_ATTRIBUTEENUM_Invisible; |
14 } | 15 } |
15 | 16 |
16 int32_t CXFA_Stroke::GetCapType() const { | 17 int32_t CXFA_Stroke::GetCapType() const { |
17 if (!m_pNode) | 18 if (!m_pNode) |
18 return XFA_ATTRIBUTEENUM_Square; | 19 return XFA_ATTRIBUTEENUM_Square; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 if (GetStrokeType() != stroke.GetStrokeType()) | 97 if (GetStrokeType() != stroke.GetStrokeType()) |
97 return FALSE; | 98 return FALSE; |
98 if (GetColor() != stroke.GetColor()) | 99 if (GetColor() != stroke.GetColor()) |
99 return FALSE; | 100 return FALSE; |
100 if ((dwFlags & XFA_STROKE_SAMESTYLE_Corner) != 0 && | 101 if ((dwFlags & XFA_STROKE_SAMESTYLE_Corner) != 0 && |
101 FXSYS_fabs(GetRadius() - stroke.GetRadius()) >= 0.01f) { | 102 FXSYS_fabs(GetRadius() - stroke.GetRadius()) >= 0.01f) { |
102 return FALSE; | 103 return FALSE; |
103 } | 104 } |
104 return TRUE; | 105 return TRUE; |
105 } | 106 } |
OLD | NEW |