function getRectScreenCoords(rect) {
    var svg = SVGTools.findParentSVG(rect);
    var pt = svg.createSVGPoint();
    var corners = {};
    var matrix = rect.getScreenCTM();

    pt.x = rect.x.animVal.value;
    pt.y = rect.y.animVal.value;
    corners.nw = pt.matrixTransform(matrix);
    pt.x += rect.width.animVal.value;
    corners.ne = pt.matrixTransform(matrix);
    pt.y += rect.height.animVal.value;
    corners.se = pt.matrixTransform(matrix);
    pt.x -= rect.width.animVal.value;
    corners.sw = pt.matrixTransform(matrix);

    return corners;
}
Get the screen coordinates of the center of
an SVG rectangle node.

@param {rect} rect svg <rect> node