diff options
author | dan sinclair <dsinclair@chromium.org> | 2017-02-07 20:46:32 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-08 02:13:33 +0000 |
commit | 071d78690a4e2becffaeeb32fe210ee58ab3e532 (patch) | |
tree | 60484551e89fa689e9af6ee7008bcd8e737ea10c /core/fxge | |
parent | bba2a7cf30da9e84bcc14ef32dbb0bb944229219 (diff) | |
download | pdfium-071d78690a4e2becffaeeb32fe210ee58ab3e532.tar.xz |
Rename x,y to width,height for Size types
This Cl fixes the naming of the size types to match their purpose. This makes
the code clearer.
Change-Id: I37a41ab0fe01782f4749054f1f8ab29ddf8d2790
Reviewed-on: https://pdfium-review.googlesource.com/2551
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge')
-rw-r--r-- | core/fxge/dib/fx_dib_transform.cpp | 7 | ||||
-rw-r--r-- | core/fxge/ge/cfx_renderdevice.cpp | 12 | ||||
-rw-r--r-- | core/fxge/win32/cfx_psrenderer.cpp | 2 |
3 files changed, 12 insertions, 9 deletions
diff --git a/core/fxge/dib/fx_dib_transform.cpp b/core/fxge/dib/fx_dib_transform.cpp index 1c29ada68f..8932a633fa 100644 --- a/core/fxge/dib/fx_dib_transform.cpp +++ b/core/fxge/dib/fx_dib_transform.cpp @@ -396,10 +396,11 @@ bool CFX_ImageTransformer::Start() { CFX_Matrix stretch2dest(1.0f, 0.0f, 0.0f, -1.0f, 0.0f, (FX_FLOAT)(stretch_height)); stretch2dest.Concat( - m_pMatrix->a / stretch_width, m_pMatrix->b / stretch_width, - m_pMatrix->c / stretch_height, m_pMatrix->d / stretch_height, - m_pMatrix->e, m_pMatrix->f); + CFX_Matrix(m_pMatrix->a / stretch_width, m_pMatrix->b / stretch_width, + m_pMatrix->c / stretch_height, m_pMatrix->d / stretch_height, + m_pMatrix->e, m_pMatrix->f)); m_dest2stretch.SetReverse(stretch2dest); + CFX_FloatRect clip_rect_f(result_clip); clip_rect_f.Transform(&m_dest2stretch); m_StretchClip = clip_rect_f.GetOuterRect(); diff --git a/core/fxge/ge/cfx_renderdevice.cpp b/core/fxge/ge/cfx_renderdevice.cpp index 2f3d1bb60e..ba99c87469 100644 --- a/core/fxge/ge/cfx_renderdevice.cpp +++ b/core/fxge/ge/cfx_renderdevice.cpp @@ -613,7 +613,7 @@ bool CFX_RenderDevice::DrawFillStrokePath(const CFX_PathData* pPathData, if (pObject2Device) matrix = *pObject2Device; matrix.TranslateI(-rect.left, -rect.top); - matrix.Concat(fScaleX, 0, 0, fScaleY, 0, 0); + matrix.Concat(CFX_Matrix(fScaleX, 0, 0, fScaleY, 0, 0)); if (!bitmap_device.GetDeviceDriver()->DrawPath( pPathData, &matrix, pGraphState, fill_color, stroke_color, fill_mode, blend_type)) { @@ -902,8 +902,10 @@ bool CFX_RenderDevice::DrawNormalText(int nChars, FX_FLOAT scale_x = FXSYS_fabs(matrixCTM.a); FX_FLOAT scale_y = FXSYS_fabs(matrixCTM.d); CFX_Matrix deviceCtm = char2device; - deviceCtm.Concat(scale_x, 0, 0, scale_y, 0, 0); - text2Device.Concat(scale_x, 0, 0, scale_y, 0, 0); + CFX_Matrix m(scale_x, 0, 0, scale_y, 0, 0); + deviceCtm.Concat(m); + text2Device.Concat(m); + for (size_t i = 0; i < glyphs.size(); ++i) { FXTEXT_GLYPHPOS& glyph = glyphs[i]; const FXTEXT_CHARPOS& charpos = pCharPos[i]; @@ -1064,8 +1066,8 @@ bool CFX_RenderDevice::DrawTextPath(int nChars, charpos.m_AdjustMatrix[2], charpos.m_AdjustMatrix[3], 0, 0); } - matrix.Concat(font_size, 0, 0, font_size, charpos.m_OriginX, - charpos.m_OriginY); + matrix.Concat(CFX_Matrix(font_size, 0, 0, font_size, charpos.m_OriginX, + charpos.m_OriginY)); const CFX_PathData* pPath = pFont->LoadGlyphPath(charpos.m_GlyphIndex, charpos.m_FontCharWidth); if (!pPath) diff --git a/core/fxge/win32/cfx_psrenderer.cpp b/core/fxge/win32/cfx_psrenderer.cpp index 9970e21254..71e62a75f2 100644 --- a/core/fxge/win32/cfx_psrenderer.cpp +++ b/core/fxge/win32/cfx_psrenderer.cpp @@ -588,7 +588,7 @@ void CFX_PSRenderer::FindPSFontGlyph(CFX_FaceCache* pFaceCache, CFX_Matrix(charpos.m_AdjustMatrix[0], charpos.m_AdjustMatrix[1], charpos.m_AdjustMatrix[2], charpos.m_AdjustMatrix[3], 0, 0); } - matrix.Concat(1.0f, 0, 0, 1.0f, 0, 0); + matrix.Concat(CFX_Matrix(1.0f, 0, 0, 1.0f, 0, 0)); const CFX_PathData* pPathData = pFaceCache->LoadGlyphPath( pFont, charpos.m_GlyphIndex, charpos.m_FontCharWidth); if (!pPathData) { |