![]() ![]() The immediate fix for Rect is that setting width,height should not alter the vertices as it currently does. We could make stim.width into an alias for stim.size and using properties that would work fine. Maybe we should allow both, and push that through to all other stimuli too. But all the other stimuli use size, size and I don't like things being inconsistent either! -) This is because PsychoPy takes a very different approach to stimulus generation than most people are used to. What to do? Right now people using Rect (including Builder scripts) are using width, height anmd I don't like breaking people's scripts unless really necessary, so we could stick with that. On this occasion, the person that added Rect broke from that model (for some reason that I forget) and used adjusted the vertices directly rather than leaving them alone and changing the scale. We set the vertices to be -0.5 : +0.5 so multiplying these up has the desired effect. Creating a temporary one.įor explanation: For most stimuli, although size is scaling the vertex position, this is actually the correct behaviour. stimulus display, since only rectangle-shaped AOIs are support. Uname_result(system='Linux', node='im-lab-009-02', release='4.15.0-47-lowlatency', version=' #50~16.04.1-Ubuntu SMP PREEMPT Fri Mar 15 17:23:', machine='x86_64', processor='x86_64')Ġ.7824 WARNING Monitor specification not found. with PsychToolbox or PsychoPy drawing commands. This result in the following output for me: Rect = Rect(win, color=WHITE, width=WIDTH, height=HEIGHT) Help="Number of frames to display the rectangle", In this case, a white (fillColor(1,1,1)) rectangle is drawn first. The way Pycairo draws is to first define a path and then draw it by either filling or outlining the path (or both). In a previous article we learnt how to draw a rectangle in Pycairo. Help=('Use size to determine the size of the rectangle, displays rect' Drawing shapes in Pycairo Martin McBride, Tags imagesurface context line circle bezier curve Categories pycairo. When a rectangle is created with the size argument, the size is half asīig as one would expect, since the rectangle doesn't touch the bottomĪnd upper boundary of the window, whereas when the width and height argumentsĪre used, the resulting rectangle is as big as one would expect. The rectangle should touch the upper and lower boundary of the window So when we display a Rectangle of 600 by 600 in the middle of the window, '''This program creates a window of 800 by 600 with a black background
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |