Implement some shape drawing functions.