/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtGui.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpainter.sip"
#include <qpainter.h>
#line 512 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpainter.sip"
#include <qpainter.h>
#line 31 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQPainterPixmapFragment.cpp"

#line 98 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpoint.sip"
#include <qpoint.h>
#line 35 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQPainterPixmapFragment.cpp"
#line 164 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qrect.sip"
#include <qrect.h>
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQPainterPixmapFragment.cpp"


PyDoc_STRVAR(doc_QPainter_PixmapFragment_create, "create(Union[QPointF, QPoint], QRectF, scaleX: float = 1, scaleY: float = 1, rotation: float = 0, opacity: float = 1) -> QPainter.PixmapFragment");

extern "C" {static PyObject *meth_QPainter_PixmapFragment_create(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QPainter_PixmapFragment_create(PyObject *, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPointF* a0;
        int a0State = 0;
        const  ::QRectF* a1;
         ::qreal a2 = 1;
         ::qreal a3 = 1;
         ::qreal a4 = 0;
         ::qreal a5 = 1;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            SIP_NULLPTR,
            sipName_scaleX,
            sipName_scaleY,
            sipName_rotation,
            sipName_opacity,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1J9|dddd", sipType_QPointF, &a0, &a0State, sipType_QRectF, &a1, &a2, &a3, &a4, &a5))
        {
             ::QPainter::PixmapFragment*sipRes;

            sipRes = new  ::QPainter::PixmapFragment( ::QPainter::PixmapFragment::create(*a0,*a1,a2,a3,a4,a5));
            sipReleaseType(const_cast< ::QPointF *>(a0), sipType_QPointF, a0State);

            return sipConvertFromNewType(sipRes,sipType_QPainter_PixmapFragment,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_PixmapFragment, sipName_create, doc_QPainter_PixmapFragment_create);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QPainter_PixmapFragment(void *, int);}
static void release_QPainter_PixmapFragment(void *sipCppV, int)
{
    delete reinterpret_cast< ::QPainter::PixmapFragment *>(sipCppV);
}


extern "C" {static void *array_QPainter_PixmapFragment(Py_ssize_t);}
static void *array_QPainter_PixmapFragment(Py_ssize_t sipNrElem)
{
    return new  ::QPainter::PixmapFragment[sipNrElem];
}


extern "C" {static void array_delete_QPainter_PixmapFragment(void *);}
static void array_delete_QPainter_PixmapFragment(void *sipCpp)
{
    delete[] reinterpret_cast< ::QPainter::PixmapFragment *>(sipCpp);
}


extern "C" {static void assign_QPainter_PixmapFragment(void *, Py_ssize_t, void *);}
static void assign_QPainter_PixmapFragment(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::QPainter::PixmapFragment *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::QPainter::PixmapFragment *>(sipSrc);
}


extern "C" {static void *copy_QPainter_PixmapFragment(const void *, Py_ssize_t);}
static void *copy_QPainter_PixmapFragment(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new  ::QPainter::PixmapFragment(reinterpret_cast<const  ::QPainter::PixmapFragment *>(sipSrc)[sipSrcIdx]);
}


extern "C" {static void dealloc_QPainter_PixmapFragment(sipSimpleWrapper *);}
static void dealloc_QPainter_PixmapFragment(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_QPainter_PixmapFragment(sipGetAddress(sipSelf), 0);
    }
}


extern "C" {static void *init_type_QPainter_PixmapFragment(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QPainter_PixmapFragment(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
     ::QPainter::PixmapFragment *sipCpp = SIP_NULLPTR;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            sipCpp = new  ::QPainter::PixmapFragment();

            return sipCpp;
        }
    }

    {
        const  ::QPainter::PixmapFragment* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QPainter_PixmapFragment, &a0))
        {
            sipCpp = new  ::QPainter::PixmapFragment(*a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QPainter_PixmapFragment[] = {
    {sipName_create, SIP_MLMETH_CAST(meth_QPainter_PixmapFragment_create), METH_VARARGS|METH_KEYWORDS, doc_QPainter_PixmapFragment_create}
};


extern "C" {static PyObject *varget_QPainter_PixmapFragment_height(void *, PyObject *, PyObject *);}
static PyObject *varget_QPainter_PixmapFragment_height(void *sipSelf, PyObject *, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = sipCpp->height;

    return PyFloat_FromDouble(sipVal);
}


extern "C" {static int varset_QPainter_PixmapFragment_height(void *, PyObject *, PyObject *);}
static int varset_QPainter_PixmapFragment_height(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = PyFloat_AsDouble(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->height = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QPainter_PixmapFragment_opacity(void *, PyObject *, PyObject *);}
static PyObject *varget_QPainter_PixmapFragment_opacity(void *sipSelf, PyObject *, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = sipCpp->opacity;

    return PyFloat_FromDouble(sipVal);
}


extern "C" {static int varset_QPainter_PixmapFragment_opacity(void *, PyObject *, PyObject *);}
static int varset_QPainter_PixmapFragment_opacity(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = PyFloat_AsDouble(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->opacity = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QPainter_PixmapFragment_rotation(void *, PyObject *, PyObject *);}
static PyObject *varget_QPainter_PixmapFragment_rotation(void *sipSelf, PyObject *, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = sipCpp->rotation;

    return PyFloat_FromDouble(sipVal);
}


extern "C" {static int varset_QPainter_PixmapFragment_rotation(void *, PyObject *, PyObject *);}
static int varset_QPainter_PixmapFragment_rotation(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = PyFloat_AsDouble(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->rotation = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QPainter_PixmapFragment_scaleX(void *, PyObject *, PyObject *);}
static PyObject *varget_QPainter_PixmapFragment_scaleX(void *sipSelf, PyObject *, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = sipCpp->scaleX;

    return PyFloat_FromDouble(sipVal);
}


extern "C" {static int varset_QPainter_PixmapFragment_scaleX(void *, PyObject *, PyObject *);}
static int varset_QPainter_PixmapFragment_scaleX(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = PyFloat_AsDouble(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->scaleX = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QPainter_PixmapFragment_scaleY(void *, PyObject *, PyObject *);}
static PyObject *varget_QPainter_PixmapFragment_scaleY(void *sipSelf, PyObject *, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = sipCpp->scaleY;

    return PyFloat_FromDouble(sipVal);
}


extern "C" {static int varset_QPainter_PixmapFragment_scaleY(void *, PyObject *, PyObject *);}
static int varset_QPainter_PixmapFragment_scaleY(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = PyFloat_AsDouble(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->scaleY = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QPainter_PixmapFragment_sourceLeft(void *, PyObject *, PyObject *);}
static PyObject *varget_QPainter_PixmapFragment_sourceLeft(void *sipSelf, PyObject *, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = sipCpp->sourceLeft;

    return PyFloat_FromDouble(sipVal);
}


extern "C" {static int varset_QPainter_PixmapFragment_sourceLeft(void *, PyObject *, PyObject *);}
static int varset_QPainter_PixmapFragment_sourceLeft(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = PyFloat_AsDouble(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->sourceLeft = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QPainter_PixmapFragment_sourceTop(void *, PyObject *, PyObject *);}
static PyObject *varget_QPainter_PixmapFragment_sourceTop(void *sipSelf, PyObject *, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = sipCpp->sourceTop;

    return PyFloat_FromDouble(sipVal);
}


extern "C" {static int varset_QPainter_PixmapFragment_sourceTop(void *, PyObject *, PyObject *);}
static int varset_QPainter_PixmapFragment_sourceTop(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = PyFloat_AsDouble(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->sourceTop = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QPainter_PixmapFragment_width(void *, PyObject *, PyObject *);}
static PyObject *varget_QPainter_PixmapFragment_width(void *sipSelf, PyObject *, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = sipCpp->width;

    return PyFloat_FromDouble(sipVal);
}


extern "C" {static int varset_QPainter_PixmapFragment_width(void *, PyObject *, PyObject *);}
static int varset_QPainter_PixmapFragment_width(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = PyFloat_AsDouble(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->width = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QPainter_PixmapFragment_x(void *, PyObject *, PyObject *);}
static PyObject *varget_QPainter_PixmapFragment_x(void *sipSelf, PyObject *, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = sipCpp->x;

    return PyFloat_FromDouble(sipVal);
}


extern "C" {static int varset_QPainter_PixmapFragment_x(void *, PyObject *, PyObject *);}
static int varset_QPainter_PixmapFragment_x(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = PyFloat_AsDouble(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->x = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QPainter_PixmapFragment_y(void *, PyObject *, PyObject *);}
static PyObject *varget_QPainter_PixmapFragment_y(void *sipSelf, PyObject *, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = sipCpp->y;

    return PyFloat_FromDouble(sipVal);
}


extern "C" {static int varset_QPainter_PixmapFragment_y(void *, PyObject *, PyObject *);}
static int varset_QPainter_PixmapFragment_y(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::qreal sipVal;
     ::QPainter::PixmapFragment *sipCpp = reinterpret_cast< ::QPainter::PixmapFragment *>(sipSelf);

    sipVal = PyFloat_AsDouble(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->y = sipVal;

    return 0;
}

sipVariableDef variables_QPainter_PixmapFragment[] = {
    {InstanceVariable, sipName_height, (PyMethodDef *)varget_QPainter_PixmapFragment_height, (PyMethodDef *)varset_QPainter_PixmapFragment_height, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_opacity, (PyMethodDef *)varget_QPainter_PixmapFragment_opacity, (PyMethodDef *)varset_QPainter_PixmapFragment_opacity, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_rotation, (PyMethodDef *)varget_QPainter_PixmapFragment_rotation, (PyMethodDef *)varset_QPainter_PixmapFragment_rotation, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_scaleX, (PyMethodDef *)varget_QPainter_PixmapFragment_scaleX, (PyMethodDef *)varset_QPainter_PixmapFragment_scaleX, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_scaleY, (PyMethodDef *)varget_QPainter_PixmapFragment_scaleY, (PyMethodDef *)varset_QPainter_PixmapFragment_scaleY, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_sourceLeft, (PyMethodDef *)varget_QPainter_PixmapFragment_sourceLeft, (PyMethodDef *)varset_QPainter_PixmapFragment_sourceLeft, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_sourceTop, (PyMethodDef *)varget_QPainter_PixmapFragment_sourceTop, (PyMethodDef *)varset_QPainter_PixmapFragment_sourceTop, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_width, (PyMethodDef *)varget_QPainter_PixmapFragment_width, (PyMethodDef *)varset_QPainter_PixmapFragment_width, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_x, (PyMethodDef *)varget_QPainter_PixmapFragment_x, (PyMethodDef *)varset_QPainter_PixmapFragment_x, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_y, (PyMethodDef *)varget_QPainter_PixmapFragment_y, (PyMethodDef *)varset_QPainter_PixmapFragment_y, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QPainter_PixmapFragment, "\1QPainter.PixmapFragment()\n"
"QPainter.PixmapFragment(QPainter.PixmapFragment)");


static pyqt5ClassPluginDef plugin_QPainter_PixmapFragment = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtGui_QPainter_PixmapFragment = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QPainter__PixmapFragment,
        SIP_NULLPTR,
        &plugin_QPainter_PixmapFragment
    },
    {
        sipNameNr_PixmapFragment,
        {212, 255, 0},
        1, methods_QPainter_PixmapFragment,
        0, SIP_NULLPTR,
        10, variables_QPainter_PixmapFragment,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QPainter_PixmapFragment,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QPainter_PixmapFragment,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QPainter_PixmapFragment,
    assign_QPainter_PixmapFragment,
    array_QPainter_PixmapFragment,
    copy_QPainter_PixmapFragment,
    release_QPainter_PixmapFragment,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QPainter_PixmapFragment,
    sizeof ( ::QPainter::PixmapFragment),
};
