Refactor rounded rectangle drawing.
Use correct start/end point when drawing rounded rectangles.
Merge pull request #798 from tobeytailor/gfx

Fixes rounded rectangles