// workaround: path must be usual rectangle, if corner=0
// otherwise the path is not drawn at all (same happens
// RoundedRectangles)
if (cornerHeight <= 0 || cornerWidth <= 0) {
path.addRectangle(x, y, width, height);
} else {
path.moveTo(x, y);
path.addArc(x, y, cornerWidth, cornerHeight, 90, 90);
path.addArc(x, bottom - cornerHeight, cornerWidth, cornerHeight, 180, 90);
path.addArc(right - cornerWidth, bottom - cornerHeight, cornerWidth, cornerHeight, 270, 90);