| 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 <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 FillType |= FXFILL_NOPATHSMOOTH; | 488 FillType |= FXFILL_NOPATHSMOOTH; |
| 489 if (bStroke) | 489 if (bStroke) |
| 490 FillType |= FX_FILL_STROKE; | 490 FillType |= FX_FILL_STROKE; |
| 491 const CPDF_GeneralStateData* pGeneralData = | 491 const CPDF_GeneralStateData* pGeneralData = |
| 492 static_cast<const CPDF_PageObject*>(pPathObj)->m_GeneralState.GetObject(); | 492 static_cast<const CPDF_PageObject*>(pPathObj)->m_GeneralState.GetObject(); |
| 493 if (pGeneralData && pGeneralData->m_StrokeAdjust) | 493 if (pGeneralData && pGeneralData->m_StrokeAdjust) |
| 494 FillType |= FX_STROKE_ADJUST; | 494 FillType |= FX_STROKE_ADJUST; |
| 495 if (m_pType3Char) | 495 if (m_pType3Char) |
| 496 FillType |= FX_FILL_TEXT_MODE; | 496 FillType |= FX_FILL_TEXT_MODE; |
| 497 | 497 |
| 498 CFX_GraphStateData graphState(*pPathObj->m_GraphState.GetObject()); | 498 CPDF_GraphState graphState = pPathObj->m_GraphState; |
| 499 if (m_Options.m_Flags & RENDER_THINLINE) | 499 if (m_Options.m_Flags & RENDER_THINLINE) |
| 500 graphState.m_LineWidth = 0; | 500 graphState.SetLineWidth(0); |
| 501 return m_pDevice->DrawPathWithBlend(pPathObj->m_Path.GetObject(), | 501 return m_pDevice->DrawPathWithBlend( |
| 502 &path_matrix, &graphState, fill_argb, | 502 pPathObj->m_Path.GetObject(), &path_matrix, graphState.GetObject(), |
| 503 stroke_argb, FillType, m_curBlend); | 503 fill_argb, stroke_argb, FillType, m_curBlend); |
| 504 } | 504 } |
| 505 | 505 |
| 506 CPDF_TransferFunc* CPDF_RenderStatus::GetTransferFunc(CPDF_Object* pObj) const { | 506 CPDF_TransferFunc* CPDF_RenderStatus::GetTransferFunc(CPDF_Object* pObj) const { |
| 507 ASSERT(pObj); | 507 ASSERT(pObj); |
| 508 CPDF_DocRenderData* pDocCache = m_pContext->GetDocument()->GetRenderData(); | 508 CPDF_DocRenderData* pDocCache = m_pContext->GetDocument()->GetRenderData(); |
| 509 return pDocCache ? pDocCache->GetTransferFunc(pObj) : nullptr; | 509 return pDocCache ? pDocCache->GetTransferFunc(pObj) : nullptr; |
| 510 } | 510 } |
| 511 FX_ARGB CPDF_RenderStatus::GetFillArgb(const CPDF_PageObject* pObj, | 511 FX_ARGB CPDF_RenderStatus::GetFillArgb(const CPDF_PageObject* pObj, |
| 512 FX_BOOL bType3) const { | 512 FX_BOOL bType3) const { |
| 513 const CPDF_ColorStateData* pColorData = pObj->m_ColorState.GetObject(); | 513 const CPDF_ColorStateData* pColorData = pObj->m_ColorState.GetObject(); |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1297 m_pDevice->StretchDIBits(m_pBitmapDevice->GetBitmap(), m_Rect.left, | 1297 m_pDevice->StretchDIBits(m_pBitmapDevice->GetBitmap(), m_Rect.left, |
| 1298 m_Rect.top, m_Rect.Width(), m_Rect.Height()); | 1298 m_Rect.top, m_Rect.Width(), m_Rect.Height()); |
| 1299 } | 1299 } |
| 1300 } | 1300 } |
| 1301 | 1301 |
| 1302 #if defined _SKIA_SUPPORT_ | 1302 #if defined _SKIA_SUPPORT_ |
| 1303 void CPDF_RenderStatus::DebugVerifyDeviceIsPreMultiplied() const { | 1303 void CPDF_RenderStatus::DebugVerifyDeviceIsPreMultiplied() const { |
| 1304 m_pDevice->DebugVerifyBitmapIsPreMultiplied(); | 1304 m_pDevice->DebugVerifyBitmapIsPreMultiplied(); |
| 1305 } | 1305 } |
| 1306 #endif | 1306 #endif |
| OLD | NEW |