2017-10-17 77 views
1

paper.view.bounds究竟會返回什麼?什麼是item.bounds?

這似乎與多個屬性一起返回一個矩形對象:

Rectangle {height: 1200, width: 1920, y: 0, x: 0} 
    height: 1200 
    width : 1920 
    x : 0 
    y : 0 
    bottom : (...) 
    bottomCenter : (...) 
    bottomLeft : (...) 
    bottomRight : (...) 
    center : (...) 
    centerX : (...) 
    centerY : (...) 
    empty : (...) 
    left : (...) 
    leftCenter : (...) 
    point : (...) 
    right : (...) 
    rightCenter : (...) 
    size : (...) 
    top : (...) 
    topCenter : (...) 
    topLeft : (...) 
    topRight : (...) 
    __proto__ : Base 

回答

1

boundsItem包圍盒

把它看作是包含你的最小方框Item

Wikipedia: Minimum Bounding Box

在幾何形狀,在N維的點集(S)的最小或最小邊界或包圍盒是具有在更高的最小度量(面積,體積,或超體積的框尺寸),所有的要點在哪裏。當使用其他種類的措施時,通常相應地調用最小框,例如「最小周長邊界框」。

Bounding-box illustration