Graphics::drawRect frames a rectangle, insetting it completely within the passed bounding rectangles. (Side note: Which is really handy! It can also be optimized in the absence of a transform, since the integer version knows a-priori that with a RectangList clip region it can perform the operation using solid or blended rectangle fills, which can be made faster than general edge table rendering)
drawRoundedRectangle(), on the other hand, draws the rectangle with the frame centered around the bounding box. So the resulting shape is not confined to the passed rectangle.
This is inconsistent. It would be really handy if the draw###() series of shape drawing functions drew inside the bounding box, saving the caller from doing the extra calculation. For example:
path.addRoundedRectangle( r.getX()+0.5, r.getY()+0.5, r.getWidth()-1, r.getHeight()-1, 2 );
This draws the rounded rectangle completely inset within ‘r’ (assuming lineThickness==1).
Now I realize that there is little chance of this getting changed, especially since it would break anyone who was calling those routines. I also realize it is trivial for me to write my own routines that perform the adjustment for lineThickness, and then just use that instead of the Graphics function. However, I point this out because drawRect() is the odd man out.