Element editor : minor improvement

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4061 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-07-21 12:29:43 +00:00
parent 012ba2ccd7
commit 50c61b4e03
13 changed files with 126 additions and 1 deletions

View File

@@ -200,6 +200,22 @@ QPainterPath PartRectangle::shape() const
QPainterPath shape;
shape.addRect(m_rect);
QPainterPathStroker pps;
pps.setWidth(penWeight());
shape = pps.createStroke(shape);
if (isSelected())
foreach(QRectF rect, m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
shape.addRect(rect);
return shape;
}
QPainterPath PartRectangle::shadowShape() const
{
QPainterPath shape;
shape.addRect(m_rect);
QPainterPathStroker pps;
pps.setWidth(penWeight());
@@ -219,6 +235,10 @@ QRectF PartRectangle::boundingRect() const
QRectF r = m_rect.normalized();
r.adjust(-adjust, -adjust, adjust, adjust);
foreach(QRectF rect, m_handler.handlerRect(m_handler.pointsForRect(m_rect)))
r |= rect;
return(r);
}