summaryrefslogtreecommitdiff
path: root/core/fxge/ge/cfx_renderdevice.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-09 13:07:43 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-09 19:02:55 +0000
commitafb44560a21298b3588b36cbaf45e2be50f2e75b (patch)
tree21f3ececad017e6be64a19c4370cfe9fd7f9c29c /core/fxge/ge/cfx_renderdevice.cpp
parent67e4faaf8be0aebc67ebfb96d33933d9f9119d20 (diff)
downloadpdfium-afb44560a21298b3588b36cbaf45e2be50f2e75b.tar.xz
Remove Transform in favour of TransformPoint
This CL removes the two Transform() overrides from CFX_Matrix and calls the TransformPoint methods directly. In the case of the 4 param version the values were assigned to the out values before calling. Change-Id: Id633826caec75b848774dcda6cfdcef2dbf5a7db Reviewed-on: https://pdfium-review.googlesource.com/2573 Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxge/ge/cfx_renderdevice.cpp')
-rw-r--r--core/fxge/ge/cfx_renderdevice.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/core/fxge/ge/cfx_renderdevice.cpp b/core/fxge/ge/cfx_renderdevice.cpp
index 52ed8c37c0..0c73c7a66a 100644
--- a/core/fxge/ge/cfx_renderdevice.cpp
+++ b/core/fxge/ge/cfx_renderdevice.cpp
@@ -475,21 +475,18 @@ bool CFX_RenderDevice::DrawPathWithBlend(const CFX_PathData* pPathData,
uint8_t fill_alpha = (fill_mode & 3) ? FXARGB_A(fill_color) : 0;
if (stroke_alpha == 0 && pPathData->GetPointCount() == 2) {
FX_PATHPOINT* pPoints = pPathData->GetPoints();
- FX_FLOAT x1, x2, y1, y2;
+ FX_FLOAT x1 = pPoints[0].m_PointX;
+ FX_FLOAT y1 = pPoints[0].m_PointY;
+ FX_FLOAT x2 = pPoints[1].m_PointX;
+ FX_FLOAT y2 = pPoints[1].m_PointY;
if (pObject2Device) {
- pObject2Device->Transform(pPoints[0].m_PointX, pPoints[0].m_PointY, x1,
- y1);
- pObject2Device->Transform(pPoints[1].m_PointX, pPoints[1].m_PointY, x2,
- y2);
- } else {
- x1 = pPoints[0].m_PointX;
- y1 = pPoints[0].m_PointY;
- x2 = pPoints[1].m_PointX;
- y2 = pPoints[1].m_PointY;
+ pObject2Device->TransformPoint(x1, y1);
+ pObject2Device->TransformPoint(x2, y2);
}
DrawCosmeticLine(x1, y1, x2, y2, fill_color, fill_mode, blend_type);
return true;
}
+
if ((pPathData->GetPointCount() == 5 || pPathData->GetPointCount() == 4) &&
stroke_alpha == 0) {
CFX_FloatRect rect_f;
@@ -913,7 +910,7 @@ bool CFX_RenderDevice::DrawNormalText(int nChars,
const FXTEXT_CHARPOS& charpos = pCharPos[i];
glyph.m_fOriginX = charpos.m_OriginX;
glyph.m_fOriginY = charpos.m_OriginY;
- text2Device.Transform(glyph.m_fOriginX, glyph.m_fOriginY);
+ text2Device.TransformPoint(glyph.m_fOriginX, glyph.m_fOriginY);
if (anti_alias < FXFT_RENDER_MODE_LCD)
glyph.m_OriginX = FXSYS_round(glyph.m_fOriginX);
else