| 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 "xfa/fxfa/include/xfa_ffwidget.h" | 7 #include "xfa/fxfa/include/xfa_ffwidget.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 if (m_pDevice->StartDIBitsWithBlend(m_pDIBSource, m_BitmapAlpha, m_FillArgb, | 626 if (m_pDevice->StartDIBitsWithBlend(m_pDIBSource, m_BitmapAlpha, m_FillArgb, |
| 627 &m_ImageMatrix, m_Flags, m_DeviceHandle, | 627 &m_ImageMatrix, m_Flags, m_DeviceHandle, |
| 628 m_BlendType)) { | 628 m_BlendType)) { |
| 629 if (m_DeviceHandle) { | 629 if (m_DeviceHandle) { |
| 630 m_Status = 3; | 630 m_Status = 3; |
| 631 return TRUE; | 631 return TRUE; |
| 632 } | 632 } |
| 633 return FALSE; | 633 return FALSE; |
| 634 } | 634 } |
| 635 CFX_FloatRect image_rect_f = m_ImageMatrix.GetUnitRect(); | 635 CFX_FloatRect image_rect_f = m_ImageMatrix.GetUnitRect(); |
| 636 FX_RECT image_rect = image_rect_f.GetOutterRect(); | 636 FX_RECT image_rect = image_rect_f.GetOuterRect(); |
| 637 int dest_width = image_rect.Width(); | 637 int dest_width = image_rect.Width(); |
| 638 int dest_height = image_rect.Height(); | 638 int dest_height = image_rect.Height(); |
| 639 if ((FXSYS_fabs(m_ImageMatrix.b) >= 0.5f || m_ImageMatrix.a == 0) || | 639 if ((FXSYS_fabs(m_ImageMatrix.b) >= 0.5f || m_ImageMatrix.a == 0) || |
| 640 (FXSYS_fabs(m_ImageMatrix.c) >= 0.5f || m_ImageMatrix.d == 0)) { | 640 (FXSYS_fabs(m_ImageMatrix.c) >= 0.5f || m_ImageMatrix.d == 0)) { |
| 641 if (m_bPrint && !(m_pDevice->GetRenderCaps() & FXRC_BLEND_MODE)) { | 641 if (m_bPrint && !(m_pDevice->GetRenderCaps() & FXRC_BLEND_MODE)) { |
| 642 m_Result = FALSE; | 642 m_Result = FALSE; |
| 643 return FALSE; | 643 return FALSE; |
| 644 } | 644 } |
| 645 CFX_DIBSource* pDib = m_pDIBSource; | 645 CFX_DIBSource* pDib = m_pDIBSource; |
| 646 if (m_pDIBSource->HasAlpha() && | 646 if (m_pDIBSource->HasAlpha() && |
| (...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2044 } | 2044 } |
| 2045 XFA_BOX_Fill(box, strokes, pGS, rtWidget, pMatrix, dwFlags); | 2045 XFA_BOX_Fill(box, strokes, pGS, rtWidget, pMatrix, dwFlags); |
| 2046 XFA_BOX_Stroke(box, strokes, pGS, rtWidget, pMatrix, dwFlags); | 2046 XFA_BOX_Stroke(box, strokes, pGS, rtWidget, pMatrix, dwFlags); |
| 2047 } | 2047 } |
| 2048 | 2048 |
| 2049 CXFA_CalcData::CXFA_CalcData() : m_iRefCount(0) {} | 2049 CXFA_CalcData::CXFA_CalcData() : m_iRefCount(0) {} |
| 2050 | 2050 |
| 2051 CXFA_CalcData::~CXFA_CalcData() { | 2051 CXFA_CalcData::~CXFA_CalcData() { |
| 2052 m_Globals.RemoveAll(); | 2052 m_Globals.RemoveAll(); |
| 2053 } | 2053 } |
| OLD | NEW |