summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-10-04 21:13:59 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-04 21:13:59 +0000
commit7cabaf136b2aa671768c9d8ee3645c9444afc700 (patch)
tree4aec57e31e1a7207e8009e9d33c9b738a3e8288b /core/fpdfapi/render
parentce6eb642dbaf96fc2a9d4e97a205a0a12e7154a4 (diff)
downloadpdfium-7cabaf136b2aa671768c9d8ee3645c9444afc700.tar.xz
CPDF_VariableText::m_nHorzScale is always 100
Remove the member and simplify logic in all the places this is passed. Change-Id: I39b979793fe84f0dc460261223655dd7f50555cc Reviewed-on: https://pdfium-review.googlesource.com/c/43474 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r--core/fpdfapi/render/cpdf_textrenderer.cpp14
-rw-r--r--core/fpdfapi/render/cpdf_textrenderer.h2
2 files changed, 6 insertions, 10 deletions
diff --git a/core/fpdfapi/render/cpdf_textrenderer.cpp b/core/fpdfapi/render/cpdf_textrenderer.cpp
index dd25d03f7b..05807321ae 100644
--- a/core/fpdfapi/render/cpdf_textrenderer.cpp
+++ b/core/fpdfapi/render/cpdf_textrenderer.cpp
@@ -75,7 +75,7 @@ void CPDF_TextRenderer::DrawTextString(CFX_RenderDevice* pDevice,
float origin_y,
CPDF_Font* pFont,
float font_size,
- const CFX_Matrix* pMatrix,
+ const CFX_Matrix& matrix,
const ByteString& str,
FX_ARGB fill_argb,
const CFX_GraphStateData* pGraphState,
@@ -99,14 +99,10 @@ void CPDF_TextRenderer::DrawTextString(CFX_RenderDevice* pDevice,
positions[i - 1] = cur_pos;
cur_pos += pFont->GetCharWidthF(codes[i]) * font_size / 1000;
}
- CFX_Matrix matrix;
- if (pMatrix)
- matrix = *pMatrix;
-
- matrix.e = origin_x;
- matrix.f = origin_y;
-
- DrawNormalText(pDevice, codes, positions, pFont, font_size, &matrix,
+ CFX_Matrix new_matrix = matrix;
+ new_matrix.e = origin_x;
+ new_matrix.f = origin_y;
+ DrawNormalText(pDevice, codes, positions, pFont, font_size, &new_matrix,
fill_argb, pOptions);
}
diff --git a/core/fpdfapi/render/cpdf_textrenderer.h b/core/fpdfapi/render/cpdf_textrenderer.h
index ac8c8c5568..d7a2f157e0 100644
--- a/core/fpdfapi/render/cpdf_textrenderer.h
+++ b/core/fpdfapi/render/cpdf_textrenderer.h
@@ -27,7 +27,7 @@ class CPDF_TextRenderer {
float origin_y,
CPDF_Font* pFont,
float font_size,
- const CFX_Matrix* matrix,
+ const CFX_Matrix& matrix,
const ByteString& str,
FX_ARGB fill_argb,
const CFX_GraphStateData* pGraphState,