diff options
author | dan sinclair <dsinclair@chromium.org> | 2017-02-22 19:56:15 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-23 01:17:40 +0000 |
commit | b147e07ee36be10ca0796a6566be107077c21a03 (patch) | |
tree | 637b1b206000a88fb3e198f648e86a9ee5178f1b /xfa/fxgraphics/cfx_path.h | |
parent | e3f237740fd8bea50b4a6f37f56455dfa0328546 (diff) | |
download | pdfium-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 'xfa/fxgraphics/cfx_path.h')
-rw-r--r-- | xfa/fxgraphics/cfx_path.h | 50 |
1 files changed, 17 insertions, 33 deletions
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); |