Skip to content
Permalink
Browse files

NF: add option of star to builder shape component

  • Loading branch information...
peircej committed Jan 31, 2019
1 parent 0694027 commit 8e6c4099347612fd03addc237993e11c92e3b098
Showing with 3 additions and 3 deletions.
  1. +3 −3 psychopy/experiment/components/polygon/__init__.py
@@ -75,7 +75,7 @@ def __init__(self, exp, parentName, name='polygon', interpolate='linear',
"can set number of vertices")
self.params['shape'] = Param(
shape, valType='str',
allowedVals=["line", "triangle", "rectangle", "cross",
allowedVals=["line", "triangle", "rectangle", "cross", "star",
"regular polygon..."],
updates='constant',
allowedUpdates=['constant'],
@@ -180,7 +180,7 @@ def writeInitCode(self, buff):
" width=%(size)s[0], height=%(size)s[1],\n" % inits)
elif vertices in ['star']:
code = ("%s = visual.ShapeStim(\n" % inits['name'] +
" win=win, name='%s', vertices='star',%s\n" % (inits['name'], unitsStr) +
" win=win, name='%s', vertices='star7',%s\n" % (inits['name'], unitsStr) +
" size=%(size)s,\n" % inits)
elif vertices in ['cross']:
code = ("%s = visual.ShapeStim(\n" % inits['name'] +
@@ -221,4 +221,4 @@ def writeInitCodeJS(self, buff):
pos=self.params['pos'],
size=self.params['size'],
lineColor=self.params['lineColor'],
fillColor=self.params['fillColor']))
fillColor=self.params['fillColor']))

0 comments on commit 8e6c409

Please sign in to comment.
You can’t perform that action at this time.