The top and left borders of the rectangle, which use a default stroke width of 1 pixel, fall exactly to the top and left borders of your SVG element (as represented by the Raphael paper object. Unlike pixel bases, drawing solutions mean that the line essentially borders the element border , which results in cropping 0.5 pixels of your border stroke.
To solve, you just need to move the drawing or shift the initial coordinate offset of the SVG element.
Here is a script showing one solution .
source share