| 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 <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 comps[i] = pBackColor->GetNumberAt(i); | 861 comps[i] = pBackColor->GetNumberAt(i); |
| 862 FX_FLOAT R = 0.0f, G = 0.0f, B = 0.0f; | 862 FX_FLOAT R = 0.0f, G = 0.0f, B = 0.0f; |
| 863 pColorSpace->GetRGB(comps, R, G, B); | 863 pColorSpace->GetRGB(comps, R, G, B); |
| 864 background = ArgbEncode(255, (int32_t)(R * 255), (int32_t)(G * 255), | 864 background = ArgbEncode(255, (int32_t)(R * 255), (int32_t)(G * 255), |
| 865 (int32_t)(B * 255)); | 865 (int32_t)(B * 255)); |
| 866 } | 866 } |
| 867 } | 867 } |
| 868 if (pDict->KeyExist("BBox")) { | 868 if (pDict->KeyExist("BBox")) { |
| 869 CFX_FloatRect rect = pDict->GetRectBy("BBox"); | 869 CFX_FloatRect rect = pDict->GetRectBy("BBox"); |
| 870 rect.Transform(pMatrix); | 870 rect.Transform(pMatrix); |
| 871 clip_rect.Intersect(rect.GetOutterRect()); | 871 clip_rect.Intersect(rect.GetOuterRect()); |
| 872 } | 872 } |
| 873 if (m_pDevice->GetDeviceCaps(FXDC_RENDER_CAPS) & FXRC_SHADING && | 873 if (m_pDevice->GetDeviceCaps(FXDC_RENDER_CAPS) & FXRC_SHADING && |
| 874 m_pDevice->GetDeviceDriver()->DrawShading(pPattern, pMatrix, clip_rect, | 874 m_pDevice->GetDeviceDriver()->DrawShading(pPattern, pMatrix, clip_rect, |
| 875 alpha, bAlphaMode)) { | 875 alpha, bAlphaMode)) { |
| 876 return; | 876 return; |
| 877 } | 877 } |
| 878 CPDF_DeviceBuffer buffer; | 878 CPDF_DeviceBuffer buffer; |
| 879 buffer.Initialize(m_pContext, m_pDevice, &clip_rect, m_pCurObj, 150); | 879 buffer.Initialize(m_pContext, m_pDevice, &clip_rect, m_pCurObj, 150); |
| 880 CFX_Matrix FinalMatrix = *pMatrix; | 880 CFX_Matrix FinalMatrix = *pMatrix; |
| 881 FinalMatrix.Concat(*buffer.GetMatrix()); | 881 FinalMatrix.Concat(*buffer.GetMatrix()); |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 } | 1191 } |
| 1192 } | 1192 } |
| 1193 if (bStroke) { | 1193 if (bStroke) { |
| 1194 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); | 1194 CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor(); |
| 1195 if (StrokeColor.IsPattern()) { | 1195 if (StrokeColor.IsPattern()) { |
| 1196 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); | 1196 DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, TRUE); |
| 1197 bStroke = FALSE; | 1197 bStroke = FALSE; |
| 1198 } | 1198 } |
| 1199 } | 1199 } |
| 1200 } | 1200 } |
| OLD | NEW |