| 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 "core/fxge/include/cfx_graphstatedata.h" | 7 #include "core/fxge/cfx_graphstatedata.h" |
| 8 | 8 |
| 9 #include "core/fxcrt/fx_memory.h" | 9 #include "core/fxcrt/fx_memory.h" |
| 10 #include "core/fxcrt/fx_system.h" | 10 #include "core/fxcrt/fx_system.h" |
| 11 | 11 |
| 12 CFX_GraphStateData::CFX_GraphStateData() | 12 CFX_GraphStateData::CFX_GraphStateData() |
| 13 : m_LineCap(LineCapButt), | 13 : m_LineCap(LineCapButt), |
| 14 m_DashCount(0), | 14 m_DashCount(0), |
| 15 m_DashArray(nullptr), | 15 m_DashArray(nullptr), |
| 16 m_DashPhase(0), | 16 m_DashPhase(0), |
| 17 m_LineJoin(LineJoinMiter), | 17 m_LineJoin(LineJoinMiter), |
| (...skipping 25 matching lines...) Expand all Loading... |
| 43 } | 43 } |
| 44 | 44 |
| 45 void CFX_GraphStateData::SetDashCount(int count) { | 45 void CFX_GraphStateData::SetDashCount(int count) { |
| 46 FX_Free(m_DashArray); | 46 FX_Free(m_DashArray); |
| 47 m_DashArray = nullptr; | 47 m_DashArray = nullptr; |
| 48 m_DashCount = count; | 48 m_DashCount = count; |
| 49 if (count == 0) | 49 if (count == 0) |
| 50 return; | 50 return; |
| 51 m_DashArray = FX_Alloc(FX_FLOAT, count); | 51 m_DashArray = FX_Alloc(FX_FLOAT, count); |
| 52 } | 52 } |
| OLD | NEW |