summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl/cpwl_edit_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/pwl/cpwl_edit_impl.cpp')
-rw-r--r--fpdfsdk/pwl/cpwl_edit_impl.cpp34
1 files changed, 9 insertions, 25 deletions
diff --git a/fpdfsdk/pwl/cpwl_edit_impl.cpp b/fpdfsdk/pwl/cpwl_edit_impl.cpp
index fb0e8afa16..c0eccfec8e 100644
--- a/fpdfsdk/pwl/cpwl_edit_impl.cpp
+++ b/fpdfsdk/pwl/cpwl_edit_impl.cpp
@@ -43,26 +43,17 @@ void DrawTextString(CFX_RenderDevice* pDevice,
float fFontSize,
const CFX_Matrix& mtUser2Device,
const ByteString& str,
- FX_ARGB crTextFill,
- int32_t nHorzScale) {
+ FX_ARGB crTextFill) {
if (!pFont)
return;
CFX_PointF pos = mtUser2Device.Transform(pt);
- CFX_Matrix mt;
- if (nHorzScale == 100) {
- mt = mtUser2Device;
- } else {
- mt = CFX_Matrix(nHorzScale / 100.0f, 0, 0, 1, 0, 0);
- mt.Concat(mtUser2Device);
- }
-
CPDF_RenderOptions ro;
ro.SetFlags(RENDER_CLEARTYPE);
-
ro.SetColorMode(CPDF_RenderOptions::kNormal);
CPDF_TextRenderer::DrawTextString(pDevice, pos.x, pos.y, pFont, fFontSize,
- &mt, str, crTextFill, nullptr, &ro);
+ mtUser2Device, str, crTextFill, nullptr,
+ &ro);
}
} // namespace
@@ -437,11 +428,8 @@ void CPWL_EditImpl::DrawEdit(CFX_RenderDevice* pDevice,
uint16_t SubWord = pEdit->GetPasswordChar();
float fFontSize = pEdit->GetFontSize();
CPVT_WordRange wrSelect = pEdit->GetSelectWordRange();
- int32_t nHorzScale = pEdit->GetHorzScale();
-
FX_COLORREF crCurFill = crTextFill;
FX_COLORREF crOldFill = crCurFill;
-
bool bSelect = false;
const FX_COLORREF crWhite = ArgbEncode(255, 255, 255, 255);
const FX_COLORREF crSelBK = ArgbEncode(255, 0, 51, 113);
@@ -504,10 +492,10 @@ void CPWL_EditImpl::DrawEdit(CFX_RenderDevice* pDevice,
if (place.LineCmp(oldplace) != 0 || word.nFontIndex != nFontIndex ||
crOldFill != crCurFill) {
if (sTextBuf.tellp() > 0) {
- DrawTextString(
- pDevice, CFX_PointF(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y),
- pFontMap->GetPDFFont(nFontIndex), fFontSize, mtUser2Device,
- ByteString(sTextBuf), crOldFill, nHorzScale);
+ DrawTextString(pDevice,
+ CFX_PointF(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y),
+ pFontMap->GetPDFFont(nFontIndex), fFontSize,
+ mtUser2Device, ByteString(sTextBuf), crOldFill);
sTextBuf.str("");
}
@@ -524,7 +512,7 @@ void CPWL_EditImpl::DrawEdit(CFX_RenderDevice* pDevice,
CFX_PointF(word.ptWord.x + ptOffset.x, word.ptWord.y + ptOffset.y),
pFontMap->GetPDFFont(word.nFontIndex), fFontSize, mtUser2Device,
pEdit->GetPDFWordString(word.nFontIndex, word.Word, SubWord),
- crCurFill, nHorzScale);
+ crCurFill);
}
oldplace = place;
}
@@ -534,7 +522,7 @@ void CPWL_EditImpl::DrawEdit(CFX_RenderDevice* pDevice,
DrawTextString(pDevice,
CFX_PointF(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y),
pFontMap->GetPDFFont(nFontIndex), fFontSize, mtUser2Device,
- ByteString(sTextBuf), crOldFill, nHorzScale);
+ ByteString(sTextBuf), crOldFill);
}
}
@@ -829,10 +817,6 @@ CFX_FloatRect CPWL_EditImpl::GetContentRect() const {
return VTToEdit(m_pVT->GetContentRect());
}
-int32_t CPWL_EditImpl::GetHorzScale() const {
- return m_pVT->GetHorzScale();
-}
-
float CPWL_EditImpl::GetCharSpace() const {
return m_pVT->GetCharSpace();
}