# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.1.1
#
# Do not make changes to this file unless you know what you are doing - modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _oofcanvas
else:
    import _oofcanvas

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "this":
            set(self, name, value)
        elif name == "thisown":
            self.this.own(value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


class Color(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, arg2, arg3, arg4):
        _oofcanvas.Color_swiginit(self, _oofcanvas.new_Color(arg2, arg3, arg4))

    def opacity(self, arg2):
        return _oofcanvas.Color_opacity(self, arg2)
    red = property(_oofcanvas.Color_red_get, _oofcanvas.Color_red_set)
    green = property(_oofcanvas.Color_green_get, _oofcanvas.Color_green_set)
    blue = property(_oofcanvas.Color_blue_get, _oofcanvas.Color_blue_set)

    def __repr__(self):
        return _oofcanvas.Color___repr__(self)
    __swig_destroy__ = _oofcanvas.delete_Color

# Register Color in _oofcanvas:
_oofcanvas.Color_swigregister(Color)
cvar = _oofcanvas.cvar
version = cvar.version
version_major = cvar.version_major
version_minor = cvar.version_minor
version_patch = cvar.version_patch

class Rectangle(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, arg2, arg3):
        _oofcanvas.Rectangle_swiginit(self, _oofcanvas.new_Rectangle(arg2, arg3))

    def xmin(self):
        return _oofcanvas.Rectangle_xmin(self)

    def xmax(self):
        return _oofcanvas.Rectangle_xmax(self)

    def ymin(self):
        return _oofcanvas.Rectangle_ymin(self)

    def ymax(self):
        return _oofcanvas.Rectangle_ymax(self)

    def __repr__(self):
        return _oofcanvas.Rectangle___repr__(self)
    __swig_destroy__ = _oofcanvas.delete_Rectangle

# Register Rectangle in _oofcanvas:
_oofcanvas.Rectangle_swigregister(Rectangle)
black = cvar.black
white = cvar.white
red = cvar.red
green = cvar.green
blue = cvar.blue
magenta = cvar.magenta
cyan = cvar.cyan
yellow = cvar.yellow
gray = cvar.gray

class LineJoin(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def value(self):
        return _oofcanvas.LineJoin_value(self)

    def __init__(self):
        _oofcanvas.LineJoin_swiginit(self, _oofcanvas.new_LineJoin())
    __swig_destroy__ = _oofcanvas.delete_LineJoin

# Register LineJoin in _oofcanvas:
_oofcanvas.LineJoin_swigregister(LineJoin)
class LineCap(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def value(self):
        return _oofcanvas.LineCap_value(self)

    def __init__(self):
        _oofcanvas.LineCap_swiginit(self, _oofcanvas.new_LineCap())
    __swig_destroy__ = _oofcanvas.delete_LineCap

# Register LineCap in _oofcanvas:
_oofcanvas.LineCap_swigregister(LineCap)
class CanvasItem(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr

    def drawBoundingBox(self, arg2, arg3):
        return _oofcanvas.CanvasItem_drawBoundingBox(self, arg2, arg3)

    def repr(self):
        return _oofcanvas.CanvasItem_repr(self)

# Register CanvasItem in _oofcanvas:
_oofcanvas.CanvasItem_swigregister(CanvasItem)
lineJoinMiter = cvar.lineJoinMiter
lineJoinRound = cvar.lineJoinRound
lineJoinBevel = cvar.lineJoinBevel
lineCapButt = cvar.lineCapButt
lineCapRound = cvar.lineCapRound
lineCapSquare = cvar.lineCapSquare

class CanvasShape(CanvasItem):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr

    def setLineWidth(self, arg2):
        return _oofcanvas.CanvasShape_setLineWidth(self, arg2)

    def setLineWidthInPixels(self, arg2):
        return _oofcanvas.CanvasShape_setLineWidthInPixels(self, arg2)

    def setLineColor(self, arg2):
        return _oofcanvas.CanvasShape_setLineColor(self, arg2)

    def setLineJoin(self, arg2):
        return _oofcanvas.CanvasShape_setLineJoin(self, arg2)

    def setLineCap(self, arg2):
        return _oofcanvas.CanvasShape_setLineCap(self, arg2)

    def setDash(self, arg2, arg3):
        return _oofcanvas.CanvasShape_setDash(self, arg2, arg3)

    def setDashInPixels(self, arg2, arg3):
        return _oofcanvas.CanvasShape_setDashInPixels(self, arg2, arg3)

    def setDashColor(self, arg2):
        return _oofcanvas.CanvasShape_setDashColor(self, arg2)

    def unsetDashes(self):
        return _oofcanvas.CanvasShape_unsetDashes(self)

# Register CanvasShape in _oofcanvas:
_oofcanvas.CanvasShape_swigregister(CanvasShape)
class CanvasFillableShape(CanvasShape):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr

    def setFillColor(self, arg2):
        return _oofcanvas.CanvasFillableShape_setFillColor(self, arg2)

# Register CanvasFillableShape in _oofcanvas:
_oofcanvas.CanvasFillableShape_swigregister(CanvasFillableShape)
class CanvasRectangle(CanvasFillableShape):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")

    @staticmethod
    def create(arg1, arg2):
        return _oofcanvas.CanvasRectangle_create(arg1, arg2)

    def __repr__(self):
        return _oofcanvas.CanvasRectangle___repr__(self)

# Register CanvasRectangle in _oofcanvas:
_oofcanvas.CanvasRectangle_swigregister(CanvasRectangle)
class CanvasSegment(CanvasShape):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")

    @staticmethod
    def create(arg1, arg2):
        return _oofcanvas.CanvasSegment_create(arg1, arg2)

    def __repr__(self):
        return _oofcanvas.CanvasSegment___repr__(self)

# Register CanvasSegment in _oofcanvas:
_oofcanvas.CanvasSegment_swigregister(CanvasSegment)
class CanvasSegments(CanvasShape):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")

    @staticmethod
    def create():
        return _oofcanvas.CanvasSegments_create()

    def addSegment(self, arg2, arg3):
        return _oofcanvas.CanvasSegments_addSegment(self, arg2, arg3)

    def __repr__(self):
        return _oofcanvas.CanvasSegments___repr__(self)

# Register CanvasSegments in _oofcanvas:
_oofcanvas.CanvasSegments_swigregister(CanvasSegments)
class CanvasCurve(CanvasShape):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")

    @staticmethod
    def create():
        return _oofcanvas.CanvasCurve_create()

    def addPoint(self, arg2):
        return _oofcanvas.CanvasCurve_addPoint(self, arg2)

    def addPoints(self, arg2):
        return _oofcanvas.CanvasCurve_addPoints(self, arg2)

    def __repr__(self):
        return _oofcanvas.CanvasCurve___repr__(self)

# Register CanvasCurve in _oofcanvas:
_oofcanvas.CanvasCurve_swigregister(CanvasCurve)
class CanvasPolygon(CanvasFillableShape):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")

    @staticmethod
    def create():
        return _oofcanvas.CanvasPolygon_create()

    def addPoint(self, arg2):
        return _oofcanvas.CanvasPolygon_addPoint(self, arg2)

    def addPoints(self, arg2):
        return _oofcanvas.CanvasPolygon_addPoints(self, arg2)

    def __repr__(self):
        return _oofcanvas.CanvasPolygon___repr__(self)

# Register CanvasPolygon in _oofcanvas:
_oofcanvas.CanvasPolygon_swigregister(CanvasPolygon)
class CanvasCircle(CanvasFillableShape):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")

    @staticmethod
    def create(arg1, arg2):
        return _oofcanvas.CanvasCircle_create(arg1, arg2)

    def __repr__(self):
        return _oofcanvas.CanvasCircle___repr__(self)

# Register CanvasCircle in _oofcanvas:
_oofcanvas.CanvasCircle_swigregister(CanvasCircle)
class CanvasEllipse(CanvasFillableShape):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")

    @staticmethod
    def create(arg1, arg2, arg3):
        return _oofcanvas.CanvasEllipse_create(arg1, arg2, arg3)

    def __repr__(self):
        return _oofcanvas.CanvasEllipse___repr__(self)

# Register CanvasEllipse in _oofcanvas:
_oofcanvas.CanvasEllipse_swigregister(CanvasEllipse)
class CanvasDot(CanvasFillableShape):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")

    @staticmethod
    def create(arg1, arg2):
        return _oofcanvas.CanvasDot_create(arg1, arg2)

    def repr(self):
        return _oofcanvas.CanvasDot_repr(self)

    def __repr__(self):
        return _oofcanvas.CanvasDot___repr__(self)

# Register CanvasDot in _oofcanvas:
_oofcanvas.CanvasDot_swigregister(CanvasDot)
class CanvasArrowhead(CanvasItem):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")

    @staticmethod
    def create(arg1, arg2, arg3):
        return _oofcanvas.CanvasArrowhead_create(arg1, arg2, arg3)

    def setSize(self, arg2, arg3):
        return _oofcanvas.CanvasArrowhead_setSize(self, arg2, arg3)

    def setSizeInPixels(self, arg2, arg3):
        return _oofcanvas.CanvasArrowhead_setSizeInPixels(self, arg2, arg3)

    def __repr__(self):
        return _oofcanvas.CanvasArrowhead___repr__(self)

# Register CanvasArrowhead in _oofcanvas:
_oofcanvas.CanvasArrowhead_swigregister(CanvasArrowhead)
class CanvasText(CanvasItem):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")

    @staticmethod
    def create(arg1, arg2):
        return _oofcanvas.CanvasText_create(arg1, arg2)

    def setFillColor(self, arg2):
        return _oofcanvas.CanvasText_setFillColor(self, arg2)

    def setFont(self, arg2, arg3):
        return _oofcanvas.CanvasText_setFont(self, arg2, arg3)

    def rotate(self, arg2):
        return _oofcanvas.CanvasText_rotate(self, arg2)

    def getSizeInPixels(self):
        return _oofcanvas.CanvasText_getSizeInPixels(self)

    def getText(self):
        return _oofcanvas.CanvasText_getText(self)

    def __repr__(self):
        return _oofcanvas.CanvasText___repr__(self)

# Register CanvasText in _oofcanvas:
_oofcanvas.CanvasText_swigregister(CanvasText)
class CanvasImage(CanvasItem):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")

    def setOpacity(self, arg2):
        return _oofcanvas.CanvasImage_setOpacity(self, arg2)

    def setSize(self, arg2):
        return _oofcanvas.CanvasImage_setSize(self, arg2)

    def setSizeInPixels(self, arg2):
        return _oofcanvas.CanvasImage_setSizeInPixels(self, arg2)

    def setDrawIndividualPixels(self, arg2):
        return _oofcanvas.CanvasImage_setDrawIndividualPixels(self, arg2)

    @staticmethod
    def newBlankImage(arg1, arg2, arg3):
        return _oofcanvas.CanvasImage_newBlankImage(arg1, arg2, arg3)

    @staticmethod
    def newFromPNGFile(arg1, arg2):
        return _oofcanvas.CanvasImage_newFromPNGFile(arg1, arg2)

    @staticmethod
    def newFromImageMagickFile(arg1, arg2):
        return _oofcanvas.CanvasImage_newFromImageMagickFile(arg1, arg2)

    def __repr__(self):
        return _oofcanvas.CanvasImage___repr__(self)

# Register CanvasImage in _oofcanvas:
_oofcanvas.CanvasImage_swigregister(CanvasImage)

def use_imagemagick():
    return _oofcanvas.use_imagemagick()
class CanvasLayer(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr

    def empty(self):
        return _oofcanvas.CanvasLayer_empty(self)

    def destroy(self):
        return _oofcanvas.CanvasLayer_destroy(self)

    def addItem(self, arg2):
        return _oofcanvas.CanvasLayer_addItem(self, arg2)

    def removeAllItems(self):
        return _oofcanvas.CanvasLayer_removeAllItems(self)

    def rebuild(self):
        return _oofcanvas.CanvasLayer_rebuild(self)

    def clear(self):
        return _oofcanvas.CanvasLayer_clear(self)

    def markDirty(self):
        return _oofcanvas.CanvasLayer_markDirty(self)

    def render(self):
        return _oofcanvas.CanvasLayer_render(self)

    def setClickable(self, arg2):
        return _oofcanvas.CanvasLayer_setClickable(self, arg2)

    def setOpacity(self, arg2):
        return _oofcanvas.CanvasLayer_setOpacity(self, arg2)

    def show(self):
        return _oofcanvas.CanvasLayer_show(self)

    def hide(self):
        return _oofcanvas.CanvasLayer_hide(self)

    def raiseBy(self, arg2):
        return _oofcanvas.CanvasLayer_raiseBy(self, arg2)

    def lowerBy(self, arg2):
        return _oofcanvas.CanvasLayer_lowerBy(self, arg2)

    def raiseToTop(self):
        return _oofcanvas.CanvasLayer_raiseToTop(self)

    def lowerToBottom(self):
        return _oofcanvas.CanvasLayer_lowerToBottom(self)

    def writeToPNG(self, arg2):
        return _oofcanvas.CanvasLayer_writeToPNG(self, arg2)

    def name(self):
        return _oofcanvas.CanvasLayer_name(self)

# Register CanvasLayer in _oofcanvas:
_oofcanvas.CanvasLayer_swigregister(CanvasLayer)
class OffScreenCanvas(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, arg2):
        _oofcanvas.OffScreenCanvas_swiginit(self, _oofcanvas.new_OffScreenCanvas(arg2))
    __swig_destroy__ = _oofcanvas.delete_OffScreenCanvas

    def newLayer(self, arg2):
        return _oofcanvas.OffScreenCanvas_newLayer(self, arg2)

    def deleteLayer(self, arg2):
        return _oofcanvas.OffScreenCanvas_deleteLayer(self, arg2)

    def getLayer(self, arg2):
        return _oofcanvas.OffScreenCanvas_getLayer(self, arg2)

    def getLayerByName(self, arg2):
        return _oofcanvas.OffScreenCanvas_getLayerByName(self, arg2)

    def nLayers(self):
        return _oofcanvas.OffScreenCanvas_nLayers(self)

    def empty(self):
        return _oofcanvas.OffScreenCanvas_empty(self)

    def raiseLayer(self, arg2, arg3):
        return _oofcanvas.OffScreenCanvas_raiseLayer(self, arg2, arg3)

    def lowerLayer(self, arg2, arg3):
        return _oofcanvas.OffScreenCanvas_lowerLayer(self, arg2, arg3)

    def lowerLayerToBottom(self, arg2):
        return _oofcanvas.OffScreenCanvas_lowerLayerToBottom(self, arg2)

    def raiseLayerToTop(self, arg2):
        return _oofcanvas.OffScreenCanvas_raiseLayerToTop(self, arg2)

    def reorderLayers(self, arg2):
        return _oofcanvas.OffScreenCanvas_reorderLayers(self, arg2)

    def clear(self):
        return _oofcanvas.OffScreenCanvas_clear(self)

    def draw(self):
        return _oofcanvas.OffScreenCanvas_draw(self)

    def getPixelsPerUnit(self):
        return _oofcanvas.OffScreenCanvas_getPixelsPerUnit(self)

    def setAntialias(self, arg2):
        return _oofcanvas.OffScreenCanvas_setAntialias(self, arg2)

    def setMargin(self, arg2):
        return _oofcanvas.OffScreenCanvas_setMargin(self, arg2)

    def setBackgroundColor(self, arg2):
        return _oofcanvas.OffScreenCanvas_setBackgroundColor(self, arg2)

    def clickedItems(self, arg2):
        return _oofcanvas.OffScreenCanvas_clickedItems(self, arg2)

    def allItems(self):
        return _oofcanvas.OffScreenCanvas_allItems(self)

    def saveAsPDF(self, arg2, arg3, arg4):
        return _oofcanvas.OffScreenCanvas_saveAsPDF(self, arg2, arg3, arg4)

    def saveAsPNG(self, arg2, arg3, arg4):
        return _oofcanvas.OffScreenCanvas_saveAsPNG(self, arg2, arg3, arg4)

    def saveRegionAsPDF(self, arg2, arg3, arg4, arg5, arg6):
        return _oofcanvas.OffScreenCanvas_saveRegionAsPDF(self, arg2, arg3, arg4, arg5, arg6)

    def saveRegionAsPNG(self, arg2, arg3, arg4, arg5, arg6):
        return _oofcanvas.OffScreenCanvas_saveRegionAsPNG(self, arg2, arg3, arg4, arg5, arg6)

    def pixel2user(self, arg2, arg3):
        return _oofcanvas.OffScreenCanvas_pixel2user(self, arg2, arg3)

    def datadump(self, arg2):
        return _oofcanvas.OffScreenCanvas_datadump(self, arg2)

# Register OffScreenCanvas in _oofcanvas:
_oofcanvas.OffScreenCanvas_swigregister(OffScreenCanvas)

def list_fonts():
    return _oofcanvas.list_fonts()

def set_mainthread():
    return _oofcanvas.set_mainthread()

def init_PyExceptionConverter(arg1):
    return _oofcanvas.init_PyExceptionConverter(arg1)

def oofcanvas_enable_threads():
    return _oofcanvas.oofcanvas_enable_threads()

class PyCanvasException(Exception):
  def __init__(self, msg):
    self.msg = msg
def pyExceptionConverter(message):
  raise PyCanvasException(message)

# init_OOFCanvas should be called before any other oofcanvas code
# is called from python.  It's ok to call it multiple times.

def init_OOFCanvas(threaded=False):
  if threaded:
     oofcanvas_enable_threads();
  init_PyExceptionConverter(pyExceptionConverter)


