# Path: canvas/context/context.py
# class CanvasRenderingContext2D(CanvasState, CanvasTransform, CanvasCompositing,
#         CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles,
#         CanvasRect, CanvasDrawPath, CanvasUserInterface, CanvasText,
#         CanvasTextDrawingStyles, CanvasDrawImage, CanvasHitRegion,
#         CanvasImageData):
# 
#     ## OpenXML NameSpace map
#     nsmap = {
#         'p': 'http://schemas.openxmlformats.org/presentationml/2006/main',
#         'a': 'http://schemas.openxmlformats.org/drawingml/2006/main',
#         'r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships',
#     }
# 
#     '''
#     Implements a HTML <canvas> interface to drawing on PresentationML/DrawingML
#     based PPTX slides.
#     '''
#     def __init__(self, canvas):
#         super(CanvasRenderingContext2D, self).__init__()
# 
#         self._canvas = canvas
# 
#         """Construct a Canvas instance."""
#         self._shadowColor = '000000'
#         self._shadowBlur = 0
#         self._shadowOffsetX = 0
#         self._shadowOffsetY = 0
# 
#         self._lineWidth = 12700
# 
#     @property
#     def canvas(self):
#         """
#         A read-only reference to the PPTXCanvas object this Context exists on.
#         """
#         return self._canvas
# 
#     @property
#     def lineWidth(self):
#         '''
#         Returns the current line width value.
#         Default value is 12700 EMU.
#         '''
#         return self._lineWidth
# 
#     @lineWidth.setter
#     def lineWidth(self, val):
#         '''
#         '''
#         self._lineWidth = val


from .context import CanvasRenderingContext2D
class Canvas(object):
    def __init__(self, slide, height, width):
        """
        Create a new Canvas interface to a provided python-pptx `Slide`.

        Parameters
        ----------
        slide : Slide
            python-pptx Slide
        height : int
            Height of Slide in EMUs
        width : int
            Width of Slide in EMUs
        """
        self._slide = slide
        self._slide_height = height
        self._slide_width = width

    def getContext(self, contextType):
        """
        Create a new Context to work with.

        This will build a new PPTX Shape to work with.

        Parameters
        ----------
        contextType : str
            The type of context to use. `2d` is the only available option.
        """
        if contextType is '2d':

# Path: canvas/context/context.py
# class CanvasRenderingContext2D(CanvasState, CanvasTransform, CanvasCompositing,
#         CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles,
#         CanvasRect, CanvasDrawPath, CanvasUserInterface, CanvasText,
#         CanvasTextDrawingStyles, CanvasDrawImage, CanvasHitRegion,
#         CanvasImageData):
# 
#     ## OpenXML NameSpace map
#     nsmap = {
#         'p': 'http://schemas.openxmlformats.org/presentationml/2006/main',
#         'a': 'http://schemas.openxmlformats.org/drawingml/2006/main',
#         'r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships',
#     }
# 
#     '''
#     Implements a HTML <canvas> interface to drawing on PresentationML/DrawingML
#     based PPTX slides.
#     '''
#     def __init__(self, canvas):
#         super(CanvasRenderingContext2D, self).__init__()
# 
#         self._canvas = canvas
# 
#         """Construct a Canvas instance."""
#         self._shadowColor = '000000'
#         self._shadowBlur = 0
#         self._shadowOffsetX = 0
#         self._shadowOffsetY = 0
# 
#         self._lineWidth = 12700
# 
#     @property
#     def canvas(self):
#         """
#         A read-only reference to the PPTXCanvas object this Context exists on.
#         """
#         return self._canvas
# 
#     @property
#     def lineWidth(self):
#         '''
#         Returns the current line width value.
#         Default value is 12700 EMU.
#         '''
#         return self._lineWidth
# 
#     @lineWidth.setter
#     def lineWidth(self, val):
#         '''
#         '''
#         self._lineWidth = val


# Path: canvas/canvas.py
from .context import CanvasRenderingContext2D

class Canvas(object):
    def __init__(self, slide, height, width):
        """
        Create a new Canvas interface to a provided python-pptx `Slide`.

        Parameters
        ----------
        slide : Slide
            python-pptx Slide
        height : int
            Height of Slide in EMUs
        width : int
            Width of Slide in EMUs
        """
        self._slide = slide
        self._slide_height = height
        self._slide_width = width

    def getContext(self, contextType):
        """
        Create a new Context to work with.

        This will build a new PPTX Shape to work with.

        Parameters
        ----------
        contextType : str
            The type of context to use. `2d` is the only available option.
        """
        if contextType is '2d':

            return CanvasRenderingContext2D(self)