当前位置: 首页 > 文档资料 > Snap.svg 英文文档 >

Snap.path.bezierBBox(…)

优质
小牛编辑
116浏览
2023-12-01

Utility method Returns the bounding box of a given cubic beziér curve

Parameters

  1. p1xnumberx of the first point of the curve
  2. p1ynumbery of the first point of the curve
  3. c1xnumberx of the first anchor of the curve
  4. c1ynumbery of the first anchor of the curve
  5. c2xnumberx of the second anchor of the curve
  6. c2ynumbery of the second anchor of the curve
  7. p2xnumberx of the second point of the curve
  8. p2ynumbery of the second point of the curve

or

Parameters

  1. bezarrayarray of six points for beziér curve

Returns: object bounding box

  1. {
    1. x: numberx coordinate of the left top point of the box,
    2. y: numbery coordinate of the left top point of the box,
    3. x2: numberx coordinate of the right bottom point of the box,
    4. y2: numbery coordinate of the right bottom point of the box,
    5. width: numberwidth of the box,
    6. height: numberheight of the box
  2. }