summaryrefslogtreecommitdiff
path: root/core/fxge/ge/cfx_renderdevice.cpp
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2017-02-22 19:56:15 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-23 01:17:40 +0000
commitb147e07ee36be10ca0796a6566be107077c21a03 (patch)
tree637b1b206000a88fb3e198f648e86a9ee5178f1b /core/fxge/ge/cfx_renderdevice.cpp
parente3f237740fd8bea50b4a6f37f56455dfa0328546 (diff)
downloadpdfium-b147e07ee36be10ca0796a6566be107077c21a03.tar.xz
Convert point x,y into CFX_PointF
This Cl converts the PointX,PointY pairs into a CFX_PointF. Change-Id: I46897832077c317a5bffb4e568550705decbc40c Reviewed-on: https://pdfium-review.googlesource.com/2821 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fxge/ge/cfx_renderdevice.cpp')
-rw-r--r--core/fxge/ge/cfx_renderdevice.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fxge/ge/cfx_renderdevice.cpp b/core/fxge/ge/cfx_renderdevice.cpp
index 203fecf061..daa67ccc91 100644
--- a/core/fxge/ge/cfx_renderdevice.cpp
+++ b/core/fxge/ge/cfx_renderdevice.cpp
@@ -490,8 +490,8 @@ bool CFX_RenderDevice::DrawPathWithBlend(const CFX_PathData* pPathData,
uint8_t fill_alpha = (fill_mode & 3) ? FXARGB_A(fill_color) : 0;
const std::vector<FX_PATHPOINT>& pPoints = pPathData->GetPoints();
if (stroke_alpha == 0 && pPoints.size() == 2) {
- CFX_PointF pos1(pPoints[0].m_PointX, pPoints[0].m_PointY);
- CFX_PointF pos2(pPoints[1].m_PointX, pPoints[1].m_PointY);
+ CFX_PointF pos1 = pPoints[0].m_Point;
+ CFX_PointF pos2 = pPoints[1].m_Point;
if (pObject2Device) {
pos1 = pObject2Device->Transform(pos1);
pos2 = pObject2Device->Transform(pos2);
@@ -692,8 +692,8 @@ bool CFX_RenderDevice::DrawCosmeticLine(FX_FLOAT x1,
}
CFX_GraphStateData graph_state;
CFX_PathData path;
- path.AppendPoint(x1, y1, FXPT_TYPE::MoveTo, false);
- path.AppendPoint(x2, y2, FXPT_TYPE::LineTo, false);
+ path.AppendPoint(CFX_PointF(x1, y1), FXPT_TYPE::MoveTo, false);
+ path.AppendPoint(CFX_PointF(x2, y2), FXPT_TYPE::LineTo, false);
return m_pDeviceDriver->DrawPath(&path, nullptr, &graph_state, 0, color,
fill_mode, blend_type);
}