##// END OF EJS Templates
Adjust pie slice bounding rectangle to account for thick pens...
Miikka Heikkinen -
r2454:c44a116d4ae8
parent child
Show More
@@ -192,6 +192,11 void PieSliceItem::updateGeometry()
192 m_boundingRect = m_slicePath.boundingRect().united(m_labelArmPath.boundingRect()).united(m_labelTextRect);
192 m_boundingRect = m_slicePath.boundingRect().united(m_labelArmPath.boundingRect()).united(m_labelTextRect);
193 else
193 else
194 m_boundingRect = m_slicePath.boundingRect();
194 m_boundingRect = m_slicePath.boundingRect();
195
196 // Inflate bounding rect by 2/3 pen width to make sure it encompasses whole slice also for thick pens
197 // and miter joins.
198 int penWidth = (m_data.m_slicePen.width() * 2) / 3;
199 m_boundingRect = m_boundingRect.adjusted(-penWidth, -penWidth, penWidth, penWidth);
195 }
200 }
196
201
197 QPointF PieSliceItem::sliceCenter(QPointF point, qreal radius, QPieSlice *slice)
202 QPointF PieSliceItem::sliceCenter(QPointF point, qreal radius, QPieSlice *slice)
General Comments 0
You need to be logged in to leave comments. Login now