diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/fpdfapi/fpdf_render/fpdf_render_text.cpp | 8 | ||||
-rw-r--r-- | core/fxge/ge/cfx_renderdevice.cpp | 56 | ||||
-rw-r--r-- | core/fxge/include/cfx_renderdevice.h | 26 |
3 files changed, 27 insertions, 63 deletions
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp index 080a7578a7..641d0b4705 100644 --- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp +++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp @@ -629,10 +629,10 @@ FX_BOOL CPDF_TextRenderer::DrawTextPath(CFX_RenderDevice* pDevice, : nullptr; CPDF_CharPosList CharPosList; CharPosList.Load(nChars, pCharCodes, pCharPos, pFont, font_size); - return pDevice->DrawTextPathWithFlags( - CharPosList.m_nChars, CharPosList.m_pCharPos, &pFont->m_Font, pCache, - font_size, pText2User, pUser2Device, pGraphState, fill_argb, stroke_argb, - pClippingPath, nFlag); + return pDevice->DrawTextPath(CharPosList.m_nChars, CharPosList.m_pCharPos, + &pFont->m_Font, pCache, font_size, pText2User, + pUser2Device, pGraphState, fill_argb, + stroke_argb, pClippingPath, nFlag); } // static diff --git a/core/fxge/ge/cfx_renderdevice.cpp b/core/fxge/ge/cfx_renderdevice.cpp index 7396308781..ad05ef743b 100644 --- a/core/fxge/ge/cfx_renderdevice.cpp +++ b/core/fxge/ge/cfx_renderdevice.cpp @@ -379,14 +379,6 @@ void CFX_RenderDevice::InitDeviceInfo() { } } -FX_BOOL CFX_RenderDevice::StartRendering() { - return m_pDeviceDriver->StartRendering(); -} - -void CFX_RenderDevice::EndRendering() { - m_pDeviceDriver->EndRendering(); -} - void CFX_RenderDevice::SaveState() { m_pDeviceDriver->SaveState(); } @@ -489,8 +481,7 @@ FX_BOOL CFX_RenderDevice::DrawPathWithBlend( x2 = pPoints[1].m_PointX; y2 = pPoints[1].m_PointY; } - DrawCosmeticLineWithFillModeAndBlend(x1, y1, x2, y2, fill_color, fill_mode, - blend_type); + DrawCosmeticLine(x1, y1, x2, y2, fill_color, fill_mode, blend_type); return TRUE; } if ((pPathData->GetPointCount() == 5 || pPathData->GetPointCount() == 4) && @@ -663,13 +654,13 @@ FX_BOOL CFX_RenderDevice::FillRectWithBlend(const FX_RECT* pRect, return TRUE; } -FX_BOOL CFX_RenderDevice::DrawCosmeticLineWithFillModeAndBlend(FX_FLOAT x1, - FX_FLOAT y1, - FX_FLOAT x2, - FX_FLOAT y2, - uint32_t color, - int fill_mode, - int blend_type) { +FX_BOOL CFX_RenderDevice::DrawCosmeticLine(FX_FLOAT x1, + FX_FLOAT y1, + FX_FLOAT x2, + FX_FLOAT y2, + uint32_t color, + int fill_mode, + int blend_type) { if ((color >= 0xff000000) && m_pDeviceDriver->DrawCosmeticLine(x1, y1, x2, y2, color, blend_type)) { return TRUE; @@ -871,9 +862,9 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, (pFont->GetSubstFont()->m_SubstFlags & FXFONT_SUBST_GLYPHPATH)) { int nPathFlags = (text_flags & FXTEXT_NOSMOOTH) == 0 ? 0 : FXFILL_NOPATHSMOOTH; - return DrawTextPathWithFlags(nChars, pCharPos, pFont, pCache, font_size, - pText2Device, nullptr, nullptr, fill_color, - 0, nullptr, nPathFlags); + return DrawTextPath(nChars, pCharPos, pFont, pCache, font_size, + pText2Device, nullptr, nullptr, fill_color, 0, + nullptr, nPathFlags); } } int anti_alias = FXFT_RENDER_MODE_MONO; @@ -1054,19 +1045,18 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars, return TRUE; } -FX_BOOL CFX_RenderDevice::DrawTextPathWithFlags( - int nChars, - const FXTEXT_CHARPOS* pCharPos, - CFX_Font* pFont, - CFX_FontCache* pCache, - FX_FLOAT font_size, - const CFX_Matrix* pText2User, - const CFX_Matrix* pUser2Device, - const CFX_GraphStateData* pGraphState, - uint32_t fill_color, - FX_ARGB stroke_color, - CFX_PathData* pClippingPath, - int nFlag) { +FX_BOOL CFX_RenderDevice::DrawTextPath(int nChars, + const FXTEXT_CHARPOS* pCharPos, + CFX_Font* pFont, + CFX_FontCache* pCache, + FX_FLOAT font_size, + const CFX_Matrix* pText2User, + const CFX_Matrix* pUser2Device, + const CFX_GraphStateData* pGraphState, + uint32_t fill_color, + FX_ARGB stroke_color, + CFX_PathData* pClippingPath, + int nFlag) { if (!pCache) pCache = CFX_GEModule::Get()->GetFontCache(); CFX_FaceCache* pFaceCache = pCache->GetCachedFace(pFont); diff --git a/core/fxge/include/cfx_renderdevice.h b/core/fxge/include/cfx_renderdevice.h index 9dd5f55ee9..6607b479c7 100644 --- a/core/fxge/include/cfx_renderdevice.h +++ b/core/fxge/include/cfx_renderdevice.h @@ -91,15 +91,12 @@ class CFX_RenderDevice { return m_pDeviceDriver.get(); } - FX_BOOL StartRendering(); - void EndRendering(); void SaveState(); void RestoreState(bool bKeepSaved); int GetWidth() const { return m_Width; } int GetHeight() const { return m_Height; } int GetDeviceClass() const { return m_DeviceClass; } - int GetBPP() const { return m_bpp; } int GetRenderCaps() const { return m_RenderCaps; } int GetDeviceCaps(int id) const; CFX_Matrix GetCTM() const; @@ -140,14 +137,6 @@ class CFX_RenderDevice { uint32_t color, int blend_type); FX_BOOL DrawCosmeticLine(FX_FLOAT x1, - FX_FLOAT y1, - FX_FLOAT x2, - FX_FLOAT y2, - uint32_t color) { - return DrawCosmeticLineWithFillModeAndBlend(x1, y1, x2, y2, color, 0, - FXDIB_BLEND_NORMAL); - } - FX_BOOL DrawCosmeticLineWithFillModeAndBlend(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2, @@ -224,21 +213,6 @@ class CFX_RenderDevice { uint32_t fill_color, uint32_t text_flags); FX_BOOL DrawTextPath(int nChars, - const FXTEXT_CHARPOS* pCharPos, - CFX_Font* pFont, - CFX_FontCache* pCache, - FX_FLOAT font_size, - const CFX_Matrix* pText2User, - const CFX_Matrix* pUser2Device, - const CFX_GraphStateData* pGraphState, - uint32_t fill_color, - uint32_t stroke_color, - CFX_PathData* pClippingPath) { - return DrawTextPathWithFlags(nChars, pCharPos, pFont, pCache, font_size, - pText2User, pUser2Device, pGraphState, - fill_color, stroke_color, pClippingPath, 0); - } - FX_BOOL DrawTextPathWithFlags(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont, CFX_FontCache* pCache, |