Fixed lineWeight and added a rectangle API
Some functions in the API: