From b147e07ee36be10ca0796a6566be107077c21a03 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Wed, 22 Feb 2017 19:56:15 -0500 Subject: Convert point x,y into CFX_PointF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tom Sepez Reviewed-by: Nicolás Peña --- xfa/fxgraphics/cfx_path.h | 50 ++++++++++++++++------------------------------- 1 file changed, 17 insertions(+), 33 deletions(-) (limited to 'xfa/fxgraphics/cfx_path.h') diff --git a/xfa/fxgraphics/cfx_path.h b/xfa/fxgraphics/cfx_path.h index 9171a91a00..1dee566788 100644 --- a/xfa/fxgraphics/cfx_path.h +++ b/xfa/fxgraphics/cfx_path.h @@ -21,50 +21,34 @@ class CFX_Path final { ~CFX_Path(); FWL_Error Create(); - FWL_Error MoveTo(FX_FLOAT x, FX_FLOAT y); - FWL_Error LineTo(FX_FLOAT x, FX_FLOAT y); - FWL_Error BezierTo(FX_FLOAT ctrlX1, - FX_FLOAT ctrlY1, - FX_FLOAT ctrlX2, - FX_FLOAT ctrlY2, - FX_FLOAT toX, - FX_FLOAT toY); - FWL_Error ArcTo(FX_FLOAT left, - FX_FLOAT top, - FX_FLOAT width, - FX_FLOAT height, + FWL_Error MoveTo(const CFX_PointF& point); + FWL_Error LineTo(const CFX_PointF& point); + FWL_Error BezierTo(const CFX_PointF& c1, + const CFX_PointF& c2, + const CFX_PointF& to); + FWL_Error ArcTo(const CFX_PointF& pos, + const CFX_SizeF& size, FX_FLOAT startAngle, FX_FLOAT sweepAngle); FWL_Error Close(); - FWL_Error AddLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2); - FWL_Error AddBezier(FX_FLOAT startX, - FX_FLOAT startY, - FX_FLOAT ctrlX1, - FX_FLOAT ctrlY1, - FX_FLOAT ctrlX2, - FX_FLOAT ctrlY2, - FX_FLOAT endX, - FX_FLOAT endY); + FWL_Error AddLine(const CFX_PointF& p1, const CFX_PointF& p2); + FWL_Error AddBezier(const CFX_PointF& p1, + const CFX_PointF& c1, + const CFX_PointF& c2, + const CFX_PointF& p2); FWL_Error AddRectangle(FX_FLOAT left, FX_FLOAT top, FX_FLOAT width, FX_FLOAT height); - FWL_Error AddEllipse(FX_FLOAT left, - FX_FLOAT top, - FX_FLOAT width, - FX_FLOAT height); + FWL_Error AddEllipse(const CFX_PointF& pos, const CFX_SizeF& size); FWL_Error AddEllipse(const CFX_RectF& rect); - FWL_Error AddArc(FX_FLOAT left, - FX_FLOAT top, - FX_FLOAT width, - FX_FLOAT height, + FWL_Error AddArc(const CFX_PointF& pos, + const CFX_SizeF& size, FX_FLOAT startAngle, FX_FLOAT sweepAngle); - FWL_Error AddPie(FX_FLOAT left, - FX_FLOAT top, - FX_FLOAT width, - FX_FLOAT height, + FWL_Error AddPie(const CFX_PointF& pos, + const CFX_SizeF& size, FX_FLOAT startAngle, FX_FLOAT sweepAngle); FWL_Error AddSubpath(CFX_Path* path); -- cgit v1.2.3