bounds
元素的边界属性。
只读属性
worldBoxBounds: IBoundsData
相对世界坐标的基础边界。
worldStrokeBounds: IBoundsData
相对世界坐标的笔触边界。
worldRenderBounds: IBoundsData
相对世界坐标的渲染边界。
关键方法
getBounds()
getBounds(type: ILayoutBoundsType
, locationType?: ILayoutLocationType
): IBoundsData
用于获取不同 坐标体系 下的 盒子边界, locationType
默认为 world。
ts
type ILayoutLocationType = 'world' | 'local' | 'inner'
type ILayoutBoundsType = 'content' | 'box' | 'stroke' | 'margin' | 'render'
rect.getBounds('box', 'local')
rect.getBounds('box', 'inner')