Repository: psychopy/psychopy

Issue:
Circle stim now requires lineColor or fillColor to be displayed
Previously you could draw a circle with 'default' colors (black line, no fill) by using:

```
visual.Circle(win, radius=300, units='pix')
```

However using latest master source the circle not being shown. For the circle to be displayed either `lineColor` and/or `fillColor` must be provided as a param.

Should lineColor and fillColor be made required params for Circle, or can it use default colors if none are provided?


Discussion:
Not sure how the system works now. There still is a `color` and `colorspace` argument, I thought setting that would set both line and fill colour to provide backwards compatibility.
oops, accidental close. I agree with above. color and colorSpace should set both line and fill

Resolving patch:
diff --git a/psychopy/visual/shape.py b/psychopy/visual/shape.py
--- a/psychopy/visual/shape.py
+++ b/psychopy/visual/shape.py
@@ -81,10 +81,9 @@ def __init__(self,
                  win,
                  units='',
                  lineWidth=1.5,
-                 lineColor=None,
-                 lineColorSpace=None,
-                 fillColor=None,
-                 fillColorSpace=None,
+                 lineColor=False, # uses False in place of None to distinguish between "not set" and "transparent"
+                 fillColor=False, # uses False in place of None to distinguish between "not set" and "transparent"
+                 colorSpace='rgb',
                  vertices=((-0.5, 0), (0, +0.5), (+0.5, 0)),
                  closeShape=True,
                  pos=(0, 0),
@@ -94,13 +93,16 @@ def __init__(self,
                  contrast=1.0,
                  depth=0,
                  interpolate=True,
-                 lineRGB=None,
-                 fillRGB=None,
                  name=None,
                  autoLog=None,
                  autoDraw=False,
-                 color=None,
-                 colorSpace='rgb'):
+                 # legacy
+                 color=False,
+                 lineRGB=False,
+                 fillRGB=False,
+                 fillColorSpace=None,
+                 lineColorSpace=None
+                 ):
         """ """  # all doc is in the attributes
         # what local vars are defined (these are the init params) for use by
         # __repr__
@@ -120,18 +122,28 @@ def __init__(self,
 
         # Appearance
         self.colorSpace = colorSpace
-        self.fillColor = fillColor
-        self.lineColor = lineColor
-        if color and not self.fillColor and not self.lineColor:
-            # if the fillColor and lineColor are not set but color is, the user probably wants color applied to both
+        if not fillColor == False:
+            self.fillColor = fillColor
+        elif not color == False:
+            # Override fillColor with color if not set
             self.fillColor = color
+        else:
+            # Default to None if neither are set
+            self.fillColor = None
+        if not lineColor == False:
+            self.lineColor = lineColor
+        elif not color == False:
+            # Override lineColor with color if not set
             self.lineColor = color
-        if lineRGB is not None:
+        else:
+            # Default to black if neither are set
+            self.lineColor = 'black'
+        if not lineRGB == False:
             # Override with RGB if set
             logging.warning("Use of rgb arguments to stimuli are deprecated."
                             " Please use color and colorSpace args instead")
             self.setLineColor(lineRGB, colorSpace='rgb', log=None)
-        if fillRGB is not None:
+        if not fillRGB == False:
             # Override with RGB if set
             logging.warning("Use of rgb arguments to stimuli are deprecated."
                             " Please use color and colorSpace args instead")
@@ -419,12 +431,10 @@ class ShapeStim(BaseShapeStim):
     def __init__(self,
                  win,
                  units='',
-                 lineWidth=1.5,
-                 lineColor='white',
-                 lineColorSpace=None,
                  colorSpace='rgb',
-                 fillColor=None,
-                 fillColorSpace=None,
+                 fillColor=False,
+                 lineColor=False,
+                 lineWidth=1.5,
                  vertices=((-0.5, 0), (0, +0.5), (+0.5, 0)),
                  windingRule=None,  # default GL.GLU_TESS_WINDING_ODD
                  closeShape=True,  # False for a line
@@ -437,7 +447,14 @@ def __init__(self,
                  interpolate=True,
                  name=None,
                  autoLog=None,
-                 autoDraw=False):
+                 autoDraw=False,
+                 # legacy
+                 color=False,
+                 lineRGB=False,
+                 fillRGB=False,
+                 fillColorSpace=None,
+                 lineColorSpace=None
+                 ):
         """
         """
         # what local vars are defined (init params, for use by __repr__)
@@ -468,10 +485,6 @@ def __init__(self,
         self.closeShape = closeShape
         self.windingRule = windingRule
         self.vertices = vertices
-        # Appearance
-        self.colorSpace = colorSpace
-        self.fillColor = fillColor
-        self.borderColor = lineColor
 
         # remove deprecated params (from ShapeStim.__init__):
         self._initParams = self._initParamsOrig


Test patch: