After deciding the point where to begin to draw your triangle ( the first vertex is in the center of the canvas in this case ) and the position of the second. Strokerect (x, y, width, height) draws a. Web there are three functions that draw rectangles on the canvas: