diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-10 18:07:35 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-10 18:07:35 +0000 |
commit | 3d1ab2d09ab96a6393c0612d9c4153d10d5028ce (patch) | |
tree | 9a7be966344aeeaddf44b99f2a86a7f177ac17a9 /core/fpdfapi/render/cpdf_imagerenderer.cpp | |
parent | f4f19b51b2d588abe80df8493c23d708ec63f1b7 (diff) | |
download | pdfium-3d1ab2d09ab96a6393c0612d9c4153d10d5028ce.tar.xz |
Add CPDF_Transparency.
Encapsulates transparency status instead of having it be a raw int.
Change-Id: I8b10dafa97da112795cf84c46cf416a0294551d5
Reviewed-on: https://pdfium-review.googlesource.com/32194
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_imagerenderer.cpp')
-rw-r--r-- | core/fpdfapi/render/cpdf_imagerenderer.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/core/fpdfapi/render/cpdf_imagerenderer.cpp b/core/fpdfapi/render/cpdf_imagerenderer.cpp index e9e6420632..a5e2e27a25 100644 --- a/core/fpdfapi/render/cpdf_imagerenderer.cpp +++ b/core/fpdfapi/render/cpdf_imagerenderer.cpp @@ -233,7 +233,8 @@ void CPDF_ImageRenderer::CalculateDrawImage( const FX_RECT& rect) const { CPDF_RenderStatus bitmap_render; bitmap_render.Initialize(m_pRenderStatus->GetContext(), pBitmapDevice2, - nullptr, nullptr, nullptr, nullptr, nullptr, 0, + nullptr, nullptr, nullptr, nullptr, nullptr, + CPDF_Transparency(), m_pRenderStatus->GetDropObjects(), nullptr, true); CPDF_ImageRenderer image_render; if (image_render.Start(&bitmap_render, pDIBSource, 0xffffffff, 255, @@ -283,10 +284,10 @@ bool CPDF_ImageRenderer::DrawPatternImage(const CFX_Matrix* pObj2Device) { bitmap_device1.GetBitmap()->Clear(0xffffff); CPDF_RenderStatus bitmap_render; - bitmap_render.Initialize(m_pRenderStatus->GetContext(), &bitmap_device1, - nullptr, nullptr, nullptr, nullptr, - m_pRenderStatus->GetRenderOptions(), 0, - m_pRenderStatus->GetDropObjects(), nullptr, true); + bitmap_render.Initialize( + m_pRenderStatus->GetContext(), &bitmap_device1, nullptr, nullptr, nullptr, + nullptr, m_pRenderStatus->GetRenderOptions(), CPDF_Transparency(), + m_pRenderStatus->GetDropObjects(), nullptr, true); CFX_Matrix patternDevice = *pObj2Device; patternDevice.Translate(static_cast<float>(-rect.left), static_cast<float>(-rect.top)); @@ -337,7 +338,8 @@ bool CPDF_ImageRenderer::DrawMaskedImage() { #endif CPDF_RenderStatus bitmap_render; bitmap_render.Initialize(m_pRenderStatus->GetContext(), &bitmap_device1, - nullptr, nullptr, nullptr, nullptr, nullptr, 0, + nullptr, nullptr, nullptr, nullptr, nullptr, + CPDF_Transparency(), m_pRenderStatus->GetDropObjects(), nullptr, true); CPDF_ImageRenderer image_render; if (image_render.Start(&bitmap_render, m_pDIBSource, 0, 255, &new_matrix, @@ -467,7 +469,7 @@ bool CPDF_ImageRenderer::StartDIBSource() { if (pStretched) { m_pRenderStatus->CompositeDIBitmap(pStretched, dest_rect.left, dest_rect.top, m_FillArgb, m_BitmapAlpha, - m_BlendType, false); + m_BlendType, CPDF_Transparency()); } return false; } |