summaryrefslogtreecommitdiff
path: root/core/fxge/win32
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-09 14:08:53 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-09 19:31:58 +0000
commit687a79c5ce07bc338192f19d8452edefaf27dd76 (patch)
tree4d16587c3fa4d36e78fd21cda614c7a734da2b01 /core/fxge/win32
parentafb44560a21298b3588b36cbaf45e2be50f2e75b (diff)
downloadpdfium-687a79c5ce07bc338192f19d8452edefaf27dd76.tar.xz
Cleanup CFX_Matrix related methods
This CL removes unused CFX_Matrix methods and cleans up the implementaion of others. Change-Id: I72d1d10d4a45cc9341a980054df5225e52a0c4f2 Reviewed-on: https://pdfium-review.googlesource.com/2574 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/win32')
-rw-r--r--core/fxge/win32/fx_win32_device.cpp7
-rw-r--r--core/fxge/win32/fx_win32_print.cpp12
2 files changed, 7 insertions, 12 deletions
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index 3df38f1965..add0f0e3d3 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -316,11 +316,6 @@ unsigned clip_liang_barsky(FX_FLOAT x1,
}
#endif // _SKIA_SUPPORT_
-bool MatrixNoScaled(const CFX_Matrix* pMatrix) {
- return pMatrix->GetA() == 1.0f && pMatrix->GetB() == 0 &&
- pMatrix->GetC() == 0 && pMatrix->GetD() == 1.0f;
-}
-
class CFX_Win32FallbackFontInfo final : public CFX_FolderFontInfo {
public:
CFX_Win32FallbackFontInfo() {}
@@ -1022,7 +1017,7 @@ bool CGdiDeviceDriver::DrawPath(const CFX_PathData* pPathData,
if (bDrawAlpha ||
((m_DeviceClass != FXDC_PRINTER && !(fill_mode & FXFILL_FULLCOVER)) ||
(pGraphState && pGraphState->m_DashCount))) {
- if (!((!pMatrix || MatrixNoScaled(pMatrix)) && pGraphState &&
+ if (!((!pMatrix || !pMatrix->WillScale()) && pGraphState &&
pGraphState->m_LineWidth == 1.f &&
(pPathData->GetPointCount() == 5 ||
pPathData->GetPointCount() == 4) &&
diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp
index 94c415b721..a2ea82a94e 100644
--- a/core/fxge/win32/fx_win32_print.cpp
+++ b/core/fxge/win32/fx_win32_print.cpp
@@ -269,12 +269,12 @@ bool CGdiPrinterDriver::DrawDeviceText(int nChars,
// Transforms
SetGraphicsMode(m_hDC, GM_ADVANCED);
XFORM xform;
- xform.eM11 = pObject2Device->GetA() / kScaleFactor;
- xform.eM12 = pObject2Device->GetB() / kScaleFactor;
- xform.eM21 = -pObject2Device->GetC() / kScaleFactor;
- xform.eM22 = -pObject2Device->GetD() / kScaleFactor;
- xform.eDx = pObject2Device->GetE();
- xform.eDy = pObject2Device->GetF();
+ xform.eM11 = pObject2Device->a / kScaleFactor;
+ xform.eM12 = pObject2Device->b / kScaleFactor;
+ xform.eM21 = -pObject2Device->c / kScaleFactor;
+ xform.eM22 = -pObject2Device->d / kScaleFactor;
+ xform.eDx = pObject2Device->e;
+ xform.eDy = pObject2Device->f;
ModifyWorldTransform(m_hDC, &xform, MWT_LEFTMULTIPLY);
// Color