summaryrefslogtreecommitdiff
path: root/xfa/src/fdp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-11-20 10:13:18 -0800
committerTom Sepez <tsepez@chromium.org>2015-11-20 10:13:18 -0800
commit5500da04e3acfa98baf9befb5d91fb787d599341 (patch)
tree8f21f3af2329daf938d8cc0f298fe22668cf1a05 /xfa/src/fdp
parent0afbad0509578a5fee6fec4394d6b3c55425cf28 (diff)
downloadpdfium-5500da04e3acfa98baf9befb5d91fb787d599341.tar.xz
Merge to XFA: Remove CFX_Matrix::Reset()
Original Review URL: https://codereview.chromium.org/1459243002 . (cherry picked from commit 6fc00fafcbac1fd5edd767fe2d4a8e4a9ef52806) R=thestig@chromium.org Review URL: https://codereview.chromium.org/1461703008 .
Diffstat (limited to 'xfa/src/fdp')
-rw-r--r--xfa/src/fdp/src/fde/fde_gedevice.cpp2
-rw-r--r--xfa/src/fdp/src/fde/fde_object.h16
-rw-r--r--xfa/src/fdp/src/fde/fde_render.cpp4
-rw-r--r--xfa/src/fdp/src/tto/fde_textout.cpp2
4 files changed, 12 insertions, 12 deletions
diff --git a/xfa/src/fdp/src/fde/fde_gedevice.cpp b/xfa/src/fdp/src/fde/fde_gedevice.cpp
index f357f50ce5..3910e65cc3 100644
--- a/xfa/src/fdp/src/fde/fde_gedevice.cpp
+++ b/xfa/src/fdp/src/fde/fde_gedevice.cpp
@@ -114,7 +114,7 @@ FX_BOOL CFDE_FxgeDevice::DrawImage(CFX_DIBSource* pDib,
if (pImgMatrix) {
dib2fxdev = *pImgMatrix;
} else {
- dib2fxdev.Reset();
+ dib2fxdev.SetIdentity();
}
dib2fxdev.a = dstRect.width;
dib2fxdev.d = -dstRect.height;
diff --git a/xfa/src/fdp/src/fde/fde_object.h b/xfa/src/fdp/src/fde/fde_object.h
index 620fe4f149..dd56b014af 100644
--- a/xfa/src/fdp/src/fde/fde_object.h
+++ b/xfa/src/fdp/src/fde/fde_object.h
@@ -84,12 +84,12 @@ class CFDE_Pen : public IFDE_Pen, public CFX_Target {
};
class CFDE_SolidBrush : public IFDE_SolidBrush, public CFX_Target {
public:
- CFDE_SolidBrush() : m_Color(0xFF000000) { m_Matrix.Reset(); }
+ CFDE_SolidBrush() : m_Color(0xFF000000) { m_Matrix.SetIdentity(); }
virtual void Release() { delete this; }
virtual int32_t GetType() const { return FDE_BRUSHTYPE_Solid; }
virtual const CFX_Matrix& GetMatrix() const { return m_Matrix; }
- virtual void ResetMatrix() { m_Matrix.Reset(); }
+ virtual void ResetMatrix() { m_Matrix.SetIdentity(); }
virtual void TranslateMatrix(FX_FLOAT dx, FX_FLOAT dy) {
m_Matrix.Translate(dx, dy);
}
@@ -108,13 +108,13 @@ class CFDE_SolidBrush : public IFDE_SolidBrush, public CFX_Target {
class CFDE_HatchBrush : public IFDE_HatchBrush, public CFX_Target {
public:
CFDE_HatchBrush() : m_iStyle(-1), m_BackColor(0), m_ForeColor(0) {
- m_Matrix.Reset();
+ m_Matrix.SetIdentity();
}
virtual void Release() { delete this; }
virtual int32_t GetType() const { return FDE_BRUSHTYPE_Hatch; }
virtual const CFX_Matrix& GetMatrix() const { return m_Matrix; }
- virtual void ResetMatrix() { m_Matrix.Reset(); }
+ virtual void ResetMatrix() { m_Matrix.SetIdentity(); }
virtual void TranslateMatrix(FX_FLOAT dx, FX_FLOAT dy) {
m_Matrix.Translate(dx, dy);
}
@@ -148,13 +148,13 @@ class CFDE_HatchBrush : public IFDE_HatchBrush, public CFX_Target {
class CFDE_TextureBrush : public IFDE_TextureBrush, public CFX_Target {
public:
CFDE_TextureBrush() : m_iWrap(0), m_pImage(NULL), m_bAutoRelease(FALSE) {
- m_Matrix.Reset();
+ m_Matrix.SetIdentity();
}
virtual void Release() { delete this; }
virtual int32_t GetType() const { return FDE_BRUSHTYPE_Texture; }
virtual const CFX_Matrix& GetMatrix() const { return m_Matrix; }
- virtual void ResetMatrix() { m_Matrix.Reset(); }
+ virtual void ResetMatrix() { m_Matrix.SetIdentity(); }
virtual void TranslateMatrix(FX_FLOAT dx, FX_FLOAT dy) {
m_Matrix.Translate(dx, dy);
}
@@ -180,13 +180,13 @@ class CFDE_LinearBrush : public IFDE_LinearGradientBrush, public CFX_Target {
public:
CFDE_LinearBrush() : m_EndColor(0), m_StartColor(0), m_iWrapMode(0) {
m_StartPoint.x = m_StartPoint.y = m_EndPoint.x = m_EndPoint.y = 0;
- m_Matrix.Reset();
+ m_Matrix.SetIdentity();
}
virtual void Release() { delete this; }
virtual int32_t GetType() const { return FDE_BRUSHTYPE_LinearGradient; }
virtual const CFX_Matrix& GetMatrix() const { return m_Matrix; }
- virtual void ResetMatrix() { m_Matrix.Reset(); }
+ virtual void ResetMatrix() { m_Matrix.SetIdentity(); }
virtual void TranslateMatrix(FX_FLOAT dx, FX_FLOAT dy) {
m_Matrix.Translate(dx, dy);
}
diff --git a/xfa/src/fdp/src/fde/fde_render.cpp b/xfa/src/fdp/src/fde/fde_render.cpp
index f30d2748f2..af5b0e848d 100644
--- a/xfa/src/fdp/src/fde/fde_render.cpp
+++ b/xfa/src/fdp/src/fde/fde_render.cpp
@@ -66,7 +66,7 @@ CFDE_RenderContext::CFDE_RenderContext()
m_pCharPos(NULL),
m_iCharPosCount(0),
m_pIterator(NULL) {
- m_Transform.Reset();
+ m_Transform.SetIdentity();
}
CFDE_RenderContext::~CFDE_RenderContext() {
StopRender();
@@ -159,7 +159,7 @@ void CFDE_RenderContext::StopRender() {
Lock();
m_eStatus = FDE_RENDERSTATUS_Reset;
m_pRenderDevice = NULL;
- m_Transform.Reset();
+ m_Transform.SetIdentity();
if (m_pIterator != NULL) {
m_pIterator->Release();
m_pIterator = NULL;
diff --git a/xfa/src/fdp/src/tto/fde_textout.cpp b/xfa/src/fdp/src/tto/fde_textout.cpp
index 7612cb52f5..a1ef69ac42 100644
--- a/xfa/src/fdp/src/tto/fde_textout.cpp
+++ b/xfa/src/fdp/src/tto/fde_textout.cpp
@@ -36,7 +36,7 @@ CFDE_TextOut::CFDE_TextOut()
m_pRenderDevice(NULL) {
m_pTxtBreak = IFX_TxtBreak::Create(FX_TXTBREAKPOLICY_None);
FXSYS_assert(m_pTxtBreak != NULL);
- m_Matrix.Reset();
+ m_Matrix.SetIdentity();
m_rtClip.Reset();
m_rtLogicClip.Reset();
}