mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 08:40:53 +01:00
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:
@@ -306,6 +306,25 @@ QPainterPath PartPolygon::shape() const
|
||||
QPainterPath shape;
|
||||
shape.addPolygon(m_polygon);
|
||||
|
||||
if (m_closed)
|
||||
shape.lineTo(m_polygon.first());
|
||||
|
||||
QPainterPathStroker pps;
|
||||
pps.setWidth(penWeight());
|
||||
shape = pps.createStroke(shape);
|
||||
|
||||
if (isSelected())
|
||||
foreach(QRectF rect, m_handler.handlerRect(m_polygon))
|
||||
shape.addRect(rect);
|
||||
|
||||
return shape;
|
||||
}
|
||||
|
||||
QPainterPath PartPolygon::shadowShape() const
|
||||
{
|
||||
QPainterPath shape;
|
||||
shape.addPolygon(m_polygon);
|
||||
|
||||
if (m_closed)
|
||||
shape.lineTo(m_polygon.first());
|
||||
|
||||
@@ -329,5 +348,9 @@ QRectF PartPolygon::boundingRect() const
|
||||
if (penWeight() == 0) adjust += 0.5;
|
||||
|
||||
r.adjust(-adjust, -adjust, adjust, adjust);
|
||||
|
||||
foreach(QRectF rect, m_handler.handlerRect(m_polygon))
|
||||
r |=rect;
|
||||
|
||||
return(r);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user