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/ge/cfx_cliprgn.h" | 7 #include "core/fxge/ge/cfx_cliprgn.h" |
8 | 8 |
9 CFX_ClipRgn::CFX_ClipRgn(int width, int height) | 9 CFX_ClipRgn::CFX_ClipRgn(int width, int height) |
10 : m_Type(RectI), m_Box(0, 0, width, height) {} | 10 : m_Type(RectI), m_Box(0, 0, width, height) {} |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 new_dib->GetBuffer() + (row - new_box.top) * new_dib->GetPitch(); | 92 new_dib->GetBuffer() + (row - new_box.top) * new_dib->GetPitch(); |
93 for (int col = new_box.left; col < new_box.right; col++) { | 93 for (int col = new_box.left; col < new_box.right; col++) { |
94 new_scan[col - new_box.left] = | 94 new_scan[col - new_box.left] = |
95 old_scan[col - m_Box.left] * mask_scan[col - left] / 255; | 95 old_scan[col - m_Box.left] * mask_scan[col - left] / 255; |
96 } | 96 } |
97 } | 97 } |
98 m_Box = new_box; | 98 m_Box = new_box; |
99 m_Mask = new_mask; | 99 m_Mask = new_mask; |
100 return; | 100 return; |
101 } | 101 } |
102 ASSERT(FALSE); | 102 ASSERT(false); |
103 } | 103 } |
OLD | NEW |