diff options
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r-- | core/fpdfapi/render/cpdf_renderstatus.cpp | 18 | ||||
-rw-r--r-- | core/fpdfapi/render/cpdf_type3cache.cpp | 6 |
2 files changed, 15 insertions, 9 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp index 8fe7a31ce4..861aec4eea 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.cpp +++ b/core/fpdfapi/render/cpdf_renderstatus.cpp @@ -327,8 +327,10 @@ void DrawFuncShading(CFX_DIBitmap* pBitmap, ymax = pDomain->GetNumberAt(3); } CFX_Matrix mtDomain2Target = pDict->GetMatrixFor("Matrix"); - CFX_Matrix matrix, reverse_matrix; + CFX_Matrix matrix; matrix.SetReverse(*pObject2Bitmap); + + CFX_Matrix reverse_matrix; reverse_matrix.SetReverse(mtDomain2Target); matrix.Concat(reverse_matrix); int width = pBitmap->GetWidth(); @@ -891,6 +893,7 @@ std::unique_ptr<CFX_DIBitmap> DrawPatternBitmap( CFX_FloatRect bitmap_rect(0.0f, 0.0f, (FX_FLOAT)width, (FX_FLOAT)height); CFX_Matrix mtAdjust; mtAdjust.MatchRect(bitmap_rect, cell_bbox); + CFX_Matrix mtPattern2Bitmap = *pObject2Device; mtPattern2Bitmap.Concat(mtAdjust); CPDF_RenderOptions options; @@ -1987,16 +1990,19 @@ void CPDF_RenderStatus::DrawTextPathWithPattern(const CPDF_TextObject* textobj, : pFont->m_FontFallbacks[charpos.m_FallbackFontPosition].get(); const CFX_PathData* pPath = font->LoadGlyphPath(charpos.m_GlyphIndex, charpos.m_FontCharWidth); - if (!pPath) { + if (!pPath) continue; - } + CPDF_PathObject path; path.m_GraphState = textobj->m_GraphState; path.m_ColorState = textobj->m_ColorState; + CFX_Matrix matrix; - if (charpos.m_bGlyphAdjust) - matrix.Set(charpos.m_AdjustMatrix[0], charpos.m_AdjustMatrix[1], - charpos.m_AdjustMatrix[2], charpos.m_AdjustMatrix[3], 0, 0); + if (charpos.m_bGlyphAdjust) { + matrix = CFX_Matrix(charpos.m_AdjustMatrix[0], charpos.m_AdjustMatrix[1], + charpos.m_AdjustMatrix[2], charpos.m_AdjustMatrix[3], + 0, 0); + } matrix.Concat(font_size, 0, 0, font_size, charpos.m_OriginX, charpos.m_OriginY); path.m_Path.Append(pPath, &matrix); diff --git a/core/fpdfapi/render/cpdf_type3cache.cpp b/core/fpdfapi/render/cpdf_type3cache.cpp index b27fdf507e..63cc780d1d 100644 --- a/core/fpdfapi/render/cpdf_type3cache.cpp +++ b/core/fpdfapi/render/cpdf_type3cache.cpp @@ -122,10 +122,10 @@ CFX_GlyphBitmap* CPDF_Type3Cache::RenderGlyph(CPDF_Type3Glyphs* pSize, return nullptr; CFX_DIBitmap* pBitmap = pChar->m_pBitmap.get(); - CFX_Matrix image_matrix, text_matrix; - image_matrix = pChar->m_ImageMatrix; - text_matrix.Set(pMatrix->a, pMatrix->b, pMatrix->c, pMatrix->d, 0, 0); + CFX_Matrix image_matrix = pChar->m_ImageMatrix; + CFX_Matrix text_matrix(pMatrix->a, pMatrix->b, pMatrix->c, pMatrix->d, 0, 0); image_matrix.Concat(text_matrix); + std::unique_ptr<CFX_DIBitmap> pResBitmap; int left = 0; int top = 0; |