[TD]position view within clip group

This commit is contained in:
wandererfan
2022-09-16 18:17:51 -04:00
committed by WandererFan
parent 541025b938
commit b3dfdc568a
3 changed files with 26 additions and 3 deletions

View File

@@ -224,6 +224,14 @@ QRectF DrawView::getRect() const
return result;
}
//get the rectangle centered on the position
QRectF DrawView::getRectAligned() const
{
double top = Y.getValue() + 0.5 * getRect().height();
double left = X.getValue() - 0.5 * getRect().width();
return {left, top, getRect().width(), - getRect().height()};
}
void DrawView::onDocumentRestored()
{
handleXYLock();