Beispiel #1
0
// Convert a Bounds object (assumed to be in screen co-ordinates) to a QRect
QRect boundsToQRect( Bounds bounds )
{
	Vec3 extents, center;
	bounds.getExtents(extents);
	bounds.getCenter(center);
	return QRect(
		QPoint(center.x - extents.x, center.y - extents.y),
		QPoint(center.x + extents.x, center.y + extents.y));
}