47 {
48 QPointF offset;
51 offset = fillRect.topLeft();
52 break;
54 offset.setX(fillRect.center().x() - 0.5 * imageSize.width());
55 offset.setY(fillRect.top());
56 break;
58 offset.setX(fillRect.right() - imageSize.width());
59 offset.setY(fillRect.top());
60 break;
62 offset.setX(fillRect.left());
63 offset.setY(fillRect.center().y() - 0.5 * imageSize.height());
64 break;
66 offset.setX(fillRect.center().x() - 0.5 * imageSize.width());
67 offset.setY(fillRect.center().y() - 0.5 * imageSize.height());
68 break;
70 offset.setX(fillRect.right() - imageSize.width());
71 offset.setY(fillRect.center().y() - 0.5 * imageSize.height());
72 break;
74 offset.setX(fillRect.left());
75 offset.setY(fillRect.bottom() - imageSize.height());
76 break;
78 offset.setX(fillRect.center().x() - 0.5 * imageSize.width());
79 offset.setY(fillRect.bottom() - imageSize.height());
80 break;
82 offset.setX(fillRect.right() - imageSize.width());
83 offset.setY(fillRect.bottom() - imageSize.height());
84 break;
85 default:
86 break;
87 }
92
93 return offset;
94 }
QPointF refPointOffsetPercent