| 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/fxgraphics/cfx_path.h" | 7 #include "xfa/fxgraphics/cfx_path.h" |
| 8 | 8 |
| 9 #include "core/fxge/cfx_pathdata.h" | 9 #include "core/fxge/cfx_pathdata.h" |
| 10 #include "xfa/fxgraphics/cfx_path_generator.h" | 10 #include "xfa/fxgraphics/cfx_path_generator.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 return FWL_Error::Succeeded; | 155 return FWL_Error::Succeeded; |
| 156 } | 156 } |
| 157 | 157 |
| 158 FWL_Error CFX_Path::Clear() { | 158 FWL_Error CFX_Path::Clear() { |
| 159 if (!m_generator) | 159 if (!m_generator) |
| 160 return FWL_Error::PropertyInvalid; | 160 return FWL_Error::PropertyInvalid; |
| 161 m_generator->GetPathData()->SetPointCount(0); | 161 m_generator->GetPathData()->SetPointCount(0); |
| 162 return FWL_Error::Succeeded; | 162 return FWL_Error::Succeeded; |
| 163 } | 163 } |
| 164 | 164 |
| 165 FX_BOOL CFX_Path::IsEmpty() const { | 165 bool CFX_Path::IsEmpty() const { |
| 166 if (!m_generator) | 166 if (!m_generator) |
| 167 return FALSE; | 167 return false; |
| 168 if (m_generator->GetPathData()->GetPointCount() == 0) | 168 if (m_generator->GetPathData()->GetPointCount() == 0) |
| 169 return TRUE; | 169 return true; |
| 170 return FALSE; | 170 return false; |
| 171 } | 171 } |
| 172 | 172 |
| 173 CFX_PathData* CFX_Path::GetPathData() const { | 173 CFX_PathData* CFX_Path::GetPathData() const { |
| 174 if (!m_generator) | 174 if (!m_generator) |
| 175 return nullptr; | 175 return nullptr; |
| 176 return m_generator->GetPathData(); | 176 return m_generator->GetPathData(); |
| 177 } | 177 } |
| OLD | NEW |