![]() With this change, users can move position of a shape stimulus by using mouse simply setting name of a MouseComponent as position of ShapeComponent. In addition, I modified () to accept event.Mouse object as a new position. I uploaded sample psyexp files to github:gist. I didn't support changing size and orientation because whether mouse cursor is on the shape may alter frame by frame if these parameters are changed. I added options to ShapeComponent to enable changing color and opacity of the shape when mouse cursor is on the shape and/or the left button of the mouse is clicked on the shape. The origin of the triangle is at the center of gravity of the rectangle. To achieve this, the origin the triangle is at the verticalĬenter of the triangle. I want to align the bottom of a triangle and a rectangle when their vertical positionĪnd height are the same. It may be better to make a separate component to I think that parameters required for drawing lines are different from those forĭrawing other shapes. Setting 'ori' option is necessary to draw oblique or horizontal lines. If the shape is 'line', 'height' parameter corresponds to the length of the line.įor other shapes, 'height' parameter corresponds to the height of the shape.īy default, a vertical line is drawn when shape option is 'line'. The new shape component has 'height' option (labelled 'Size' in the Builder dialog). I've committed these changes to my branch. Rect and Circle components have not been deleted yet. Previous Shape component was renamed to CustomShape. I tried writing a new Shape component that supports line, triangle, square and circle. The Custom category rather than Stimuli(?) Width and height allow you to create ellipses seems quite nice, andįor a custom set of vertices the easiest way to implement it isĬertainly then to have a CustomShape Component. Visual.Polygon(win, edges=32, radius=.) #or more edges ifįor a circle, although radius makes most sense as a term, the fact that I think, in the code, a triangle can be called with either of For the user it means only one extraĬomponent button (showing a triangle, circle and square in its icon?)Īnd for the developer it means fewer files to change if you want to ![]() I was wondering about a general ShapeĬomponent that had a shape parameter with possible values =
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |