Beispiel #1
0
    def __init__(self, *args, **kwprops):
        initialProperties = {'family':  'Times',
                             'style':   'Normal',
                             'weight':  'Normal',
                             'size':    12,
                            }

        initialProperties.update(kwprops)
        PObject.__init__(self, initialProperties)
Beispiel #2
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)