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 "core/include/fxge/fx_ge.h" | 7 #include "core/include/fxge/fx_ge.h" |
8 | 8 |
9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ | 9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ |
10 #include <crtdbg.h> | 10 #include <crtdbg.h> |
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 FX_DWORD color, | 1179 FX_DWORD color, |
1180 int dest_left, | 1180 int dest_left, |
1181 int dest_top, | 1181 int dest_top, |
1182 int dest_width, | 1182 int dest_width, |
1183 int dest_height, | 1183 int dest_height, |
1184 const FX_RECT* pClipRect, | 1184 const FX_RECT* pClipRect, |
1185 FX_DWORD flags, | 1185 FX_DWORD flags, |
1186 int alpha_flag, | 1186 int alpha_flag, |
1187 void* pIccTransform, | 1187 void* pIccTransform, |
1188 int blend_type) { | 1188 int blend_type) { |
1189 ASSERT(pSource != NULL && pClipRect != NULL); | 1189 ASSERT(pSource && pClipRect); |
1190 if (flags || dest_width > 10000 || dest_width < -10000 || | 1190 if (flags || dest_width > 10000 || dest_width < -10000 || |
1191 dest_height > 10000 || dest_height < -10000) { | 1191 dest_height > 10000 || dest_height < -10000) { |
1192 return UseFoxitStretchEngine(pSource, color, dest_left, dest_top, | 1192 return UseFoxitStretchEngine(pSource, color, dest_left, dest_top, |
1193 dest_width, dest_height, pClipRect, flags, | 1193 dest_width, dest_height, pClipRect, flags, |
1194 alpha_flag, pIccTransform, blend_type); | 1194 alpha_flag, pIccTransform, blend_type); |
1195 } | 1195 } |
1196 if (pSource->IsAlphaMask()) { | 1196 if (pSource->IsAlphaMask()) { |
1197 FX_RECT image_rect; | 1197 FX_RECT image_rect; |
1198 image_rect.left = dest_width > 0 ? dest_left : dest_left + dest_width; | 1198 image_rect.left = dest_width > 0 ? dest_left : dest_left + dest_width; |
1199 image_rect.right = dest_width > 0 ? dest_left + dest_width : dest_left; | 1199 image_rect.right = dest_width > 0 ? dest_left + dest_width : dest_left; |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 SelectObject(m_hDC, m_hOldBitmap); | 1356 SelectObject(m_hDC, m_hOldBitmap); |
1357 DeleteDC(m_hDC); | 1357 DeleteDC(m_hDC); |
1358 } | 1358 } |
1359 if (m_hBitmap) { | 1359 if (m_hBitmap) { |
1360 DeleteObject(m_hBitmap); | 1360 DeleteObject(m_hBitmap); |
1361 } | 1361 } |
1362 delete GetBitmap(); | 1362 delete GetBitmap(); |
1363 } | 1363 } |
1364 | 1364 |
1365 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ | 1365 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ |
OLD | NEW |