![]() That means that each time we flip the window, we need to draw something again in order to see it.įor example, we can add in another section where we flip the window and wait for another keypress, but this time without drawing our text. Top right, bottom right, bottom left, top left coords 300, 300, 300, -300, -300, -300, -300, 300 if dir 0: Right (0) Reduce the x coordinates for the right of the mask to the center + the distance needed to cover the characters at the center of the screen coords00 0 + ((size 0.75) 2. Importantly, in this process of “flipping” the window, we wipe what was previously drawn to the front window. def genMask(size, dir): Store coordinates of the edges of the screen. Once we have done all the drawing we want to do, and we are ready to see the results, we “flip” the layers around what was at the back is now at the front, and hence visible. ![]() When we execute the draw command, we are “painting” the second layer of the window which, because it is behind the first layer, we cannot see. So what does this command do and why does it make what we have drawn visible?Ī useful way to think about it is as if the window has two layers, one in front of the other. To make it appear, we have to reinstate the win.flip() command. You can see that even though we have “drawn” the stimulus to the window, it does not appear. pos (arraylike) Initial position ( x, y ) of the shape on-screen relative to the origin located at the center of the window or buffer in units. ![]() Recall that everything to the right of a # character in a line of Python code is treated as a “comment”, and is not interpreted by Python. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |