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)是说,用一个最小的矩形,把找到的形状包起来

博客提及2D游戏中同时移动多个控件时,使用widgets不方便。介绍了元素在单一坐标系中的定位,原点与窗口左上角的关系,窗口大小改变时原点会相对移动。还指出每个项目有自己的坐标系,以及矩形边框是用最小矩形包裹形状。
819

被折叠的 条评论
为什么被折叠?



