protected onLoad(): void {
const itemNode = this.node.getChildByName('item')
const boundingBox = itemNode.getBoundingBox()
const graphicsNode = new cc.Node()
graphicsNode.parent = itemNode.parent
const graphics = graphicsNode.addComponent(cc.Graphics)
graphics.strokeColor = cc.Color.RED
graphics.lineWidth = 2
graphics.rect(boundingBox.x, boundingBox.y, boundingBox.width, boundingBox.height)
graphics.stroke()
}
使用 getBoundingBox() 获取到的大小是包含了节点4个角的,怎么获取白色节点实际的边框啊?





