summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/dib/fx_dib_transform.cpp2
-rw-r--r--core/fxge/ge/cfx_facecache.cpp8
-rw-r--r--core/fxge/ge/cfx_renderdevice.cpp2
-rw-r--r--core/fxge/win32/fx_win32_device.cpp7
-rw-r--r--core/fxge/win32/fx_win32_print.cpp12
5 files changed, 13 insertions, 18 deletions
diff --git a/core/fxge/dib/fx_dib_transform.cpp b/core/fxge/dib/fx_dib_transform.cpp
index 55e8b8fa20..bd88272941 100644
--- a/core/fxge/dib/fx_dib_transform.cpp
+++ b/core/fxge/dib/fx_dib_transform.cpp
@@ -456,7 +456,7 @@ bool CFX_ImageTransformer::Continue(IFX_Pause* pPause) {
CFX_Matrix result2stretch(1.0f, 0.0f, 0.0f, 1.0f, (FX_FLOAT)(m_result.left),
(FX_FLOAT)(m_result.top));
result2stretch.Concat(m_dest2stretch);
- result2stretch.TranslateI(-m_StretchClip.left, -m_StretchClip.top);
+ result2stretch.Translate(-m_StretchClip.left, -m_StretchClip.top);
if (!stretch_buf_mask && pTransformed->m_pAlphaMask) {
pTransformed->m_pAlphaMask->Clear(0xff000000);
} else if (pTransformed->m_pAlphaMask) {
diff --git a/core/fxge/ge/cfx_facecache.cpp b/core/fxge/ge/cfx_facecache.cpp
index cbaa07e449..314c95b8b2 100644
--- a/core/fxge/ge/cfx_facecache.cpp
+++ b/core/fxge/ge/cfx_facecache.cpp
@@ -101,10 +101,10 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(const CFX_Font* pFont,
return nullptr;
FXFT_Matrix ft_matrix;
- ft_matrix.xx = (signed long)(pMatrix->GetA() / 64 * 65536);
- ft_matrix.xy = (signed long)(pMatrix->GetC() / 64 * 65536);
- ft_matrix.yx = (signed long)(pMatrix->GetB() / 64 * 65536);
- ft_matrix.yy = (signed long)(pMatrix->GetD() / 64 * 65536);
+ ft_matrix.xx = (signed long)(pMatrix->a / 64 * 65536);
+ ft_matrix.xy = (signed long)(pMatrix->c / 64 * 65536);
+ ft_matrix.yx = (signed long)(pMatrix->b / 64 * 65536);
+ ft_matrix.yy = (signed long)(pMatrix->d / 64 * 65536);
bool bUseCJKSubFont = false;
const CFX_SubstFont* pSubstFont = pFont->GetSubstFont();
if (pSubstFont) {
diff --git a/core/fxge/ge/cfx_renderdevice.cpp b/core/fxge/ge/cfx_renderdevice.cpp
index 0c73c7a66a..12a3dd480d 100644
--- a/core/fxge/ge/cfx_renderdevice.cpp
+++ b/core/fxge/ge/cfx_renderdevice.cpp
@@ -610,7 +610,7 @@ bool CFX_RenderDevice::DrawFillStrokePath(const CFX_PathData* pPathData,
CFX_Matrix matrix;
if (pObject2Device)
matrix = *pObject2Device;
- matrix.TranslateI(-rect.left, -rect.top);
+ matrix.Translate(-rect.left, -rect.top);
matrix.Concat(CFX_Matrix(fScaleX, 0, 0, fScaleY, 0, 0));
if (!bitmap_device.GetDeviceDriver()->DrawPath(
pPathData, &matrix, pGraphState, fill_color, stroke_color, fill_mode,
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