Same as the previous commit, but for circles and rectangles as well.