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:
xavier
2013-02-11 18:35:13 +00:00
parent cbee08b115
commit ec6ea11d0d
19 changed files with 100 additions and 0 deletions

View File

@@ -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.