• 3948阅读
  • 1回复

场景跟项 [复制链接]

上一主题 下一主题
离线gueangyik
 
只看楼主 倒序阅读 楼主  发表于: 2010-04-01
QGraphicsItem::mapFromScene(0, 0)  
这里参数0,0是 场景的坐标 还是项的坐标??



QGraphicsItem::mapFromScene()
QGraphicsItem::mapToScene()

高手帮我详细解答一下这2个函数 整糊涂了 谢谢了
离线dbzhang800

只看该作者 1楼 发表于: 2010-04-01
引用楼主gueangyik于2010-04-01 17:00发表的 场景跟项 :
QGraphicsItem::mapFromScene(0, 0)  
这里参数0,0是 场景的坐标 还是项的坐标??
.......


多看看manual:(里面说的已经很清楚了)

QPointF QGraphicsItem::mapFromScene ( const QPointF & point ) const
Maps the point point, which is in this item's scene's coordinate system, to this item's coordinate system, and returns the mapped coordinate.


QPointF QGraphicsItem::mapToScene ( const QPointF & point ) const
Maps the point point, which is in this item's coordinate system, to the scene's coordinate system, and returns the mapped coordinate.
快速回复
限100 字节
 
上一个 下一个