Texture Painting, getting straight lines and sharp corners

hi

could anybody tell me if there is a way to draw straight lines on blender texture paint mode(i suck ad drawing straight lines freehanded ) . also is there a way to set brush to rectangular shape. e.g how to get a 90 degree sharp corner. the only way i see doing it, is by scaling burh down to 1-2 pixels and freehand it.