branchobj.cpp
changeset 661 6a5e2c27f8a4
parent 654 10bd509b235c
child 682 16af22e2c155
     1.1 --- a/branchobj.cpp	Wed Jan 16 15:45:20 2008 +0000
     1.2 +++ b/branchobj.cpp	Fri Feb 01 15:28:35 2008 +0000
     1.3 @@ -1424,6 +1424,28 @@
     1.4  }
     1.5  
     1.6  
     1.7 +QPolygonF BranchObj::shape()
     1.8 +{
     1.9 +	QPolygonF p;
    1.10 +
    1.11 +	QRectF r=getTotalBBox();
    1.12 +	if (orientation==LinkableMapObj::LeftOfCenter)
    1.13 +		p   <<r.bottomLeft()
    1.14 +			<<r.topLeft()
    1.15 +			<<QPointF (bbox.topLeft().x(), r.topLeft().y() )
    1.16 +			<<bbox.topRight()
    1.17 +			<<bbox.bottomRight()
    1.18 +			<<QPointF (bbox.bottomLeft().x(), r.bottomLeft().y() ) ;
    1.19 +	else		
    1.20 +		p   <<r.bottomRight()
    1.21 +			<<r.topRight()
    1.22 +			<<QPointF (bbox.topRight().x(), r.topRight().y() )
    1.23 +			<<bbox.topLeft()
    1.24 +			<<bbox.bottomLeft()
    1.25 +			<<QPointF (bbox.bottomRight().x(), r.bottomRight().y() ) ;
    1.26 +	return p;
    1.27 +}
    1.28 +
    1.29  QRectF BranchObj::getTotalBBox()
    1.30  {
    1.31  	QRectF r=bbox;