Snap.path.bezierBBox(…)
优质
小牛编辑
124浏览
2023-12-01
Utility method Returns the bounding box of a given cubic beziér curve
Parameters
- p1xnumberx of the first point of the curve
- p1ynumbery of the first point of the curve
- c1xnumberx of the first anchor of the curve
- c1ynumbery of the first anchor of the curve
- c2xnumberx of the second anchor of the curve
- c2ynumbery of the second anchor of the curve
- p2xnumberx of the second point of the curve
- p2ynumbery of the second point of the curve
or
Parameters
- bezarrayarray of six points for beziér curve
Returns: object bounding box
- {
- x: numberx coordinate of the left top point of the box,
- y: numbery coordinate of the left top point of the box,
- x2: numberx coordinate of the right bottom point of the box,
- y2: numbery coordinate of the right bottom point of the box,
- width: numberwidth of the box,
- height: numberheight of the box
- }