# Path: canvas/context/gradient.py
# class CanvasGradient(object):
#     """
#     interface CanvasGradient {
#         // opaque object
#         void addColorStop(double offset, DOMString color);
#     };
#     """
#     def addColorStop(self, offset, color):
#         """
#         """
#         pass
# 
# Path: canvas/context/pattern.py
# class CanvasPattern(object):
#     """
#     interface CanvasPattern {
#         // opaque object
#         void setTransform(DOMMatrix transform);
#     };
#     """
#     def setTransform(self, transform):
#         """
#         """
#         pass
# 
# Path: canvas/lib/color.py
# class Color:
# 
#     colour = None
# 
#     def __init__(self, *args, **kwargs):
#         self.colour = ColorBase(*args, **kwargs)
# 
#     def __getattr__(self, attr):
#         return self.colour.__getattr__(attr)
# 
#     @property
#     def hex(self):
#         color = re.sub('^#', '', self.colour.__getattr__('hex_l'))
#         return color
# 
#     def __str__(self):
#         return "%s" % self.colour.__getattr__('web')
# 
#     def __repr__(self):
#         return "<Color %s>" % self.colour.__getattr__('web')


from .gradient import CanvasGradient
from .pattern import CanvasPattern
from canvas.lib.color import Color
            [TreatNullAs=EmptyString] DOMString repetition);
    };
    """
    _strokeStyle = Color('black')
    _fillStyle = Color('black')

    def __init__(self):
        if type(self) == CanvasFillStrokeStyles:
            raise Exception('<CanvasFillStrokeStyles> must be subclassed.')

    @property
    def strokeStyle(self):
        """
        Returns the current style used for stroking shapes.
        """
        return self._strokeStyle

    @strokeStyle.setter
    def strokeStyle(self, val):
        """
        Can be set, to change the stroke style.

        The style can be either a string containing a CSS colour, or a
        CanvasGradient or CanvasPattern object. Invalid values are ignored.
        """
        if (isinstance(val, CanvasGradient) or
                isinstance(val, CanvasPattern) or
                isinstance(val, Color)):
            self._strokeStyle = val
        else:

# Path: canvas/context/gradient.py
# class CanvasGradient(object):
#     """
#     interface CanvasGradient {
#         // opaque object
#         void addColorStop(double offset, DOMString color);
#     };
#     """
#     def addColorStop(self, offset, color):
#         """
#         """
#         pass
# 
# Path: canvas/context/pattern.py
# class CanvasPattern(object):
#     """
#     interface CanvasPattern {
#         // opaque object
#         void setTransform(DOMMatrix transform);
#     };
#     """
#     def setTransform(self, transform):
#         """
#         """
#         pass
# 
# Path: canvas/lib/color.py
# class Color:
# 
#     colour = None
# 
#     def __init__(self, *args, **kwargs):
#         self.colour = ColorBase(*args, **kwargs)
# 
#     def __getattr__(self, attr):
#         return self.colour.__getattr__(attr)
# 
#     @property
#     def hex(self):
#         color = re.sub('^#', '', self.colour.__getattr__('hex_l'))
#         return color
# 
#     def __str__(self):
#         return "%s" % self.colour.__getattr__('web')
# 
#     def __repr__(self):
#         return "<Color %s>" % self.colour.__getattr__('web')


# Path: canvas/context/fillstrokestyles.py
from .gradient import CanvasGradient
from .pattern import CanvasPattern
from canvas.lib.color import Color

            [TreatNullAs=EmptyString] DOMString repetition);
    };
    """
    _strokeStyle = Color('black')
    _fillStyle = Color('black')

    def __init__(self):
        if type(self) == CanvasFillStrokeStyles:
            raise Exception('<CanvasFillStrokeStyles> must be subclassed.')

    @property
    def strokeStyle(self):
        """
        Returns the current style used for stroking shapes.
        """
        return self._strokeStyle

    @strokeStyle.setter
    def strokeStyle(self, val):
        """
        Can be set, to change the stroke style.

        The style can be either a string containing a CSS colour, or a
        CanvasGradient or CanvasPattern object. Invalid values are ignored.
        """
        if (isinstance(val, CanvasGradient) or
                isinstance(val, CanvasPattern) or
                isinstance(val, Color)):
            self._strokeStyle = val
        else:

            self._strokeStyle=  Color(val)