Beispiel #1
0
    def setProps(self, props={}, **kwprops):
        """
        Remove 'color' from props and/or kwprops. Then set the color, and
        then set the kwprops. props takes precedence over kwprops.
        """

        color = kwprops.pop('color', None)
        color = props.pop('color', color)
        if not isinstance(color, Color):
            kwprops['color'] = Color(color)
        else:
            kwprops['color'] = color

        PObject.setProps(self, props, **kwprops)