| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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 "../../../include/fxcrt/fx_system.h" | 7 #include "core/include/fxcrt/fx_system.h" |
| 8 #include "../../../include/fxge/fx_ge.h" | 8 #include "core/include/fxge/fx_ge.h" |
| 9 #include "third_party/base/numerics/safe_math.h" | 9 #include "third_party/base/numerics/safe_math.h" |
| 10 | 10 |
| 11 CFX_ClipRgn::CFX_ClipRgn(int width, int height) { | 11 CFX_ClipRgn::CFX_ClipRgn(int width, int height) { |
| 12 m_Type = RectI; | 12 m_Type = RectI; |
| 13 m_Box.left = m_Box.top = 0; | 13 m_Box.left = m_Box.top = 0; |
| 14 m_Box.right = width; | 14 m_Box.right = width; |
| 15 m_Box.bottom = height; | 15 m_Box.bottom = height; |
| 16 } | 16 } |
| 17 CFX_ClipRgn::CFX_ClipRgn(const FX_RECT& rect) { | 17 CFX_ClipRgn::CFX_ClipRgn(const FX_RECT& rect) { |
| 18 m_Type = RectI; | 18 m_Type = RectI; |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 } | 649 } |
| 650 void CFX_GraphStateData::SetDashCount(int count) { | 650 void CFX_GraphStateData::SetDashCount(int count) { |
| 651 FX_Free(m_DashArray); | 651 FX_Free(m_DashArray); |
| 652 m_DashArray = NULL; | 652 m_DashArray = NULL; |
| 653 m_DashCount = count; | 653 m_DashCount = count; |
| 654 if (count == 0) { | 654 if (count == 0) { |
| 655 return; | 655 return; |
| 656 } | 656 } |
| 657 m_DashArray = FX_Alloc(FX_FLOAT, count); | 657 m_DashArray = FX_Alloc(FX_FLOAT, count); |
| 658 } | 658 } |
| OLD | NEW |