mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Element editor: introduced CustomElementPart::sceneGeometricRect(), which provides a margin-less equivalent to sceneBoundingRect().
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2035 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -163,6 +163,16 @@ bool PartPolygon::isUseless() const {
|
||||
return(true);
|
||||
}
|
||||
|
||||
/**
|
||||
@return the minimum, margin-less rectangle this part can fit into, in scene
|
||||
coordinates. It is different from boundingRect() because it is not supposed
|
||||
to imply any margin, and it is different from shape because it is a regular
|
||||
rectangle, not a complex shape.
|
||||
*/
|
||||
QRectF PartPolygon::sceneGeometricRect() const {
|
||||
return(mapToScene(polygon().boundingRect()).boundingRect());
|
||||
}
|
||||
|
||||
/**
|
||||
Start the user-induced transformation, provided this primitive is contained
|
||||
within the \a initial_selection_rect bounding rectangle.
|
||||
|
||||
Reference in New Issue
Block a user