diff options
author | tsepez <tsepez@chromium.org> | 2016-09-02 15:22:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-02 15:22:00 -0700 |
commit | bbee445c5a77dfbaea9041308f001c756e49c5fd (patch) | |
tree | 65fe8d3808891c81c791e8592ba3aba8d9e2d81c /core/fpdfapi/fpdf_render/fpdf_render_text.cpp | |
parent | d54c9d8df1511f6abac291ec2ec660cef372d9d3 (diff) | |
download | pdfium-bbee445c5a77dfbaea9041308f001c756e49c5fd.tar.xz |
Make CPDF_GeneralState have a CPDF_GeneralStateDatachromium/2848
Remove a const cast along the way and propagate to callers.
Review-Url: https://codereview.chromium.org/2303553002
Diffstat (limited to 'core/fpdfapi/fpdf_render/fpdf_render_text.cpp')
-rw-r--r-- | core/fpdfapi/fpdf_render/fpdf_render_text.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp index ed254c17be..74997027ca 100644 --- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp +++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp @@ -32,7 +32,7 @@ #include "core/fxge/include/cfx_pathdata.h" #include "core/fxge/include/cfx_renderdevice.h" -FX_BOOL CPDF_RenderStatus::ProcessText(const CPDF_TextObject* textobj, +FX_BOOL CPDF_RenderStatus::ProcessText(CPDF_TextObject* textobj, const CFX_Matrix* pObj2Device, CFX_PathData* pClippingPath) { if (textobj->m_nChars == 0) @@ -128,15 +128,10 @@ FX_BOOL CPDF_RenderStatus::ProcessText(const CPDF_TextObject* textobj, flag |= FX_FILL_STROKE; flag |= FX_STROKE_TEXT_MODE; } - const CPDF_GeneralStateData* pGeneralData = - static_cast<const CPDF_PageObject*>(textobj) - ->m_GeneralState.GetObject(); - if (pGeneralData && pGeneralData->m_StrokeAdjust) { + if (textobj->m_GeneralState.GetStrokeAdjust()) flag |= FX_STROKE_ADJUST; - } - if (m_Options.m_Flags & RENDER_NOTEXTSMOOTH) { + if (m_Options.m_Flags & RENDER_NOTEXTSMOOTH) flag |= FXFILL_NOPATHSMOOTH; - } return CPDF_TextRenderer::DrawTextPath( m_pDevice, textobj->m_nChars, textobj->m_pCharCodes, textobj->m_pCharPos, pFont, font_size, &text_matrix, pDeviceMatrix, @@ -178,7 +173,7 @@ class CPDF_RefType3Cache { }; // TODO(npm): Font fallback for type 3 fonts? (Completely separate code!!) -FX_BOOL CPDF_RenderStatus::ProcessType3Text(const CPDF_TextObject* textobj, +FX_BOOL CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj, const CFX_Matrix* pObj2Device) { CPDF_Type3Font* pType3Font = textobj->m_TextState.GetFont()->AsType3Font(); for (int i = 0; i < m_Type3FontCache.GetSize(); ++i) { |