Chromium Code Reviews| Index: core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp |
| diff --git a/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp |
| index fc06c0be5703d801bf429dd32f375f71a7301f5d..090060d2c0e5c9a2b7306dbc4bab76527dc38b4c 100644 |
| --- a/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp |
| +++ b/core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp |
| @@ -961,7 +961,9 @@ void CPDF_RenderStatus::DrawShadingPattern(CPDF_ShadingPattern* pattern, |
| CFX_Matrix matrix = *pattern->pattern_to_form(); |
| matrix.Concat(*pObj2Device); |
| GetScaledMatrix(matrix); |
| - int alpha = pPageObj->m_GeneralState.GetAlpha(bStroke); |
| + int alpha = |
| + FXSYS_round(255 * (bStroke ? pPageObj->m_GeneralState.GetStrokeAlpha() |
|
dsinclair
2016/09/01 19:35:52
Why does this and the below change?
Tom Sepez
2016/09/01 20:01:48
They are inconsistent about whether the API to the
|
| + : pPageObj->m_GeneralState.GetFillAlpha())); |
| DrawShading(pattern, &matrix, rect, alpha, |
| m_Options.m_ColorMode == RENDER_COLOR_ALPHA); |
| m_pDevice->RestoreState(false); |
| @@ -978,12 +980,12 @@ void CPDF_RenderStatus::ProcessShading(const CPDF_ShadingObject* pShadingObj, |
| CFX_Matrix matrix = pShadingObj->m_Matrix; |
| matrix.Concat(*pObj2Device); |
| DrawShading(pShadingObj->m_pShading, &matrix, rect, |
| - pShadingObj->m_GeneralState.GetAlpha(FALSE), |
| + FXSYS_round(255 * pShadingObj->m_GeneralState.GetFillAlpha()), |
| m_Options.m_ColorMode == RENDER_COLOR_ALPHA); |
| } |
| void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern, |
| - const CPDF_PageObject* pPageObj, |
| + CPDF_PageObject* pPageObj, |
| const CFX_Matrix* pObj2Device, |
| FX_BOOL bStroke) { |
| if (!pPattern->Load()) { |
| @@ -1167,7 +1169,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern, |
| m_pDevice->RestoreState(false); |
| } |
| -void CPDF_RenderStatus::DrawPathWithPattern(const CPDF_PathObject* pPathObj, |
| +void CPDF_RenderStatus::DrawPathWithPattern(CPDF_PathObject* pPathObj, |
| const CFX_Matrix* pObj2Device, |
| const CPDF_Color* pColor, |
| FX_BOOL bStroke) { |
| @@ -1181,7 +1183,7 @@ void CPDF_RenderStatus::DrawPathWithPattern(const CPDF_PathObject* pPathObj, |
| DrawShadingPattern(pShadingPattern, pPathObj, pObj2Device, bStroke); |
| } |
| -void CPDF_RenderStatus::ProcessPathPattern(const CPDF_PathObject* pPathObj, |
| +void CPDF_RenderStatus::ProcessPathPattern(CPDF_PathObject* pPathObj, |
| const CFX_Matrix* pObj2Device, |
| int& filltype, |
| FX_BOOL& bStroke) { |