page205
Custom 2D Graphics with Graphics View
2D游戏中会同时移动多个控件。
使用widgets不方便。
You should be able to see that all three elements are positioned in a
single coordinate system, where the x axis points to the right and
the y axis points down. We didn’t specify any coordinates for the
text item, so it’s displayed at the origin point (that is, the point
with zero coordinates), next to the top-left corner of the rectangle.
However, that (0, 0) point does not correspond to the top-left
corner of the window. In fact, if you resize the window, you’ll note
that the origin has shifted relative to the window, because the view
tries to display the scene’s content as centered.
Each item has its own coordinate system. In our example of Post-it
notes, the content of each note is defined relative to the top-left
corner of the note.
shear 剪切
矩形边框(Bounding Rectangle)是说,用一个最小的矩形,把找到的形状包起来