//- This method return the bounding box for this locator shape, 
//- providing a bounding box routine makes refresh and selection more efficient. 
//
MBoundingBox arrowLocator::boundingBox() const
{
	MPoint upLeftCorner(-3.0, 0.0, -2.0);
	MPoint downRightCorner(2.0, 0.0, 2.0);
	MBoundingBox boundingArea(upLeftCorner,downRightCorner);
	return boundingArea;
}
Ejemplo n.º 2
0
CCircleView::CCircleView(UINT typeOfElement, const Point& center, long radius)
	: CShapeView(typeOfElement, center)
	, radius(radius)
{
	fillColor = Color::Transparent;
	Size size(radius*2, radius*2);
	Point upLeftCorner(center.X-radius, center.Y-radius);
	enclosingRect = new Rect(upLeftCorner, size);
}