# 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
        return self._fillStyle

    @fillStyle.setter
    def fillStyle(self, val):
        """
        Can be set, to change the fill 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._fillStyle = val
        else:
            self._fillStyle = Color(val)

    def createLinearGradient(self, x0, y0, x1, y1):
        """
        """
        return CanvasGradient()

    def createRadialGradient(self, x0, y0, r0, x1, y1, r1):
        """
        """
        return CanvasGradient()

    def createPattern(self, source, repetition='repeat'):
        """
        """

# 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

        return self._fillStyle

    @fillStyle.setter
    def fillStyle(self, val):
        """
        Can be set, to change the fill 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._fillStyle = val
        else:
            self._fillStyle = Color(val)

    def createLinearGradient(self, x0, y0, x1, y1):
        """
        """
        return CanvasGradient()

    def createRadialGradient(self, x0, y0, r0, x1, y1, r1):
        """
        """
        return CanvasGradient()

    def createPattern(self, source, repetition='repeat'):
        """
        """

        return CanvasPattern()