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/fpdfapi/fpdf_render/render_int.h" | 7 #include "core/fpdfapi/fpdf_render/render_int.h" |
8 | 8 |
9 #include "core/fpdfapi/fpdf_font/cpdf_type3char.h" | 9 #include "core/fpdfapi/fpdf_font/cpdf_type3char.h" |
10 #include "core/fpdfapi/fpdf_font/cpdf_type3font.h" | 10 #include "core/fpdfapi/fpdf_font/cpdf_type3font.h" |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 format == PDFCS_DEVICEN) { | 743 format == PDFCS_DEVICEN) { |
744 blend_type = FXDIB_BLEND_DARKEN; | 744 blend_type = FXDIB_BLEND_DARKEN; |
745 } | 745 } |
746 pDocument->GetPageData()->ReleaseColorSpace(pCSObj); | 746 pDocument->GetPageData()->ReleaseColorSpace(pCSObj); |
747 } | 747 } |
748 } | 748 } |
749 if (!pSMaskDict && group_alpha == 1.0f && blend_type == FXDIB_BLEND_NORMAL && | 749 if (!pSMaskDict && group_alpha == 1.0f && blend_type == FXDIB_BLEND_NORMAL && |
750 !bTextClip && !bGroupTransparent) { | 750 !bTextClip && !bGroupTransparent) { |
751 return FALSE; | 751 return FALSE; |
752 } | 752 } |
753 FX_BOOL isolated = Transparency & PDFTRANS_ISOLATED; | 753 bool isolated = !!(Transparency & PDFTRANS_ISOLATED); |
754 if (m_bPrint) { | 754 if (m_bPrint) { |
755 FX_BOOL bRet = FALSE; | 755 FX_BOOL bRet = FALSE; |
756 int rendCaps = m_pDevice->GetRenderCaps(); | 756 int rendCaps = m_pDevice->GetRenderCaps(); |
757 if (!((Transparency & PDFTRANS_ISOLATED) || pSMaskDict || bTextClip) && | 757 if (!((Transparency & PDFTRANS_ISOLATED) || pSMaskDict || bTextClip) && |
758 (rendCaps & FXRC_BLEND_MODE)) { | 758 (rendCaps & FXRC_BLEND_MODE)) { |
759 int oldBlend = m_curBlend; | 759 int oldBlend = m_curBlend; |
760 m_curBlend = blend_type; | 760 m_curBlend = blend_type; |
761 bRet = DrawObjWithBlend(pPageObj, pObj2Device); | 761 bRet = DrawObjWithBlend(pPageObj, pObj2Device); |
762 m_curBlend = oldBlend; | 762 m_curBlend = oldBlend; |
763 } | 763 } |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1287 m_pContext->GetBackground(m_pBitmapDevice->GetBitmap(), m_pObject, pOptions, | 1287 m_pContext->GetBackground(m_pBitmapDevice->GetBitmap(), m_pObject, pOptions, |
1288 &m_Matrix); | 1288 &m_Matrix); |
1289 return TRUE; | 1289 return TRUE; |
1290 } | 1290 } |
1291 void CPDF_ScaledRenderBuffer::OutputToDevice() { | 1291 void CPDF_ScaledRenderBuffer::OutputToDevice() { |
1292 if (m_pBitmapDevice) { | 1292 if (m_pBitmapDevice) { |
1293 m_pDevice->StretchDIBits(m_pBitmapDevice->GetBitmap(), m_Rect.left, | 1293 m_pDevice->StretchDIBits(m_pBitmapDevice->GetBitmap(), m_Rect.left, |
1294 m_Rect.top, m_Rect.Width(), m_Rect.Height()); | 1294 m_Rect.top, m_Rect.Width(), m_Rect.Height()); |
1295 } | 1295 } |
1296 } | 1296 } |
OLD | NEW |