Element.getBBox()
优质
小牛编辑
131浏览
2023-12-01
Returns the bounding box descriptor for the given element
Returns: object bounding box descriptor:
- {
- cx: numberx of the center,
- cy: numberx of the center,
- h: numberheight,
- height: numberheight,
- path: stringpath command for the box,
- r0: numberradius of a circle that fully encloses the box,
- r1: numberradius of the smallest circle that can be enclosed,
- r2: numberradius of the largest circle that can be enclosed,
- vb: stringbox as a viewbox command,
- w: numberwidth,
- width: numberwidth,
- x2: numberx of the right side,
- x: numberx of the left side,
- y2: numbery of the bottom edge,
- y: numbery of the top edge
- }