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

Element.getBBox()

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

Returns the bounding box descriptor for the given element

Returns: object bounding box descriptor:

  1. {
    1. cx: numberx of the center,
    2. cy: numberx of the center,
    3. h: numberheight,
    4. height: numberheight,
    5. path: stringpath command for the box,
    6. r0: numberradius of a circle that fully encloses the box,
    7. r1: numberradius of the smallest circle that can be enclosed,
    8. r2: numberradius of the largest circle that can be enclosed,
    9. vb: stringbox as a viewbox command,
    10. w: numberwidth,
    11. width: numberwidth,
    12. x2: numberx of the right side,
    13. x: numberx of the left side,
    14. y2: numbery of the bottom edge,
    15. y: numbery of the top edge
  2. }