centerX, centerY - it's not the center. It's just the leftTop position.DrawableRoundRectangle
double centerX_, double centerY_, double width_, double hight_, double cornerWidth_, double cornerHeight_
hight_ - misspelling (height).
width, height - it's not the width and height. It's rightBottom position of the figure.
IM 7, macOS 10.12.3