Ported shape stuff to use libGDX classes.