Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(827)

Unified Diff: core/fpdfapi/fpdf_render/fpdf_render_text.cpp

Issue 2303553002: Make CPDF_GeneralState have a CPDF_GeneralStateData (Closed)
Patch Set: Nit Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp ('k') | core/fpdfapi/fpdf_render/render_int.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_render/fpdf_render_text.cpp
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
index ed254c17be9c697137b5a9474cd8eeb9839622c7..74997027ca39358cf9ecc94aa4d8b3970dfb254d 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) {
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp ('k') | core/fpdfapi/fpdf_render/render_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698