/***************************************************************************
                            qt_QWMatrix.cpp -  description
                             -------------------
    begin                : Tue Nov 20 20:51:20 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Tue Nov 20 20:51:20 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "qt_QWMatrix.h"
}

#include <qwmatrix.h>

class QWMatrixBridge : public QWMatrix
{
public:
	QWMatrixBridge() : QWMatrix() {}
	QWMatrixBridge(double m11, double m12, double m21, double m22, double dx, double dy) : QWMatrix(m11, m12, m21, m22, dx, dy) {}
};

qt_QWMatrix * qt_new_QWMatrix(){
	return (qt_QWMatrix *) new QWMatrixBridge();
}
qt_QWMatrix * qt_new_QWMatrix1(double m11, double m12, double m21, double m22, double dx, double dy){
	return (qt_QWMatrix *) new QWMatrixBridge((double)m11, (double)m12, (double)m21, (double)m22, (double)dx, (double)dy);
}
void qt_QWMatrix_setMatrix( qt_QWMatrix* instPointer,double m11, double m12, double m21, double m22, double dx, double dy){
	((QWMatrixBridge*)instPointer)->setMatrix((double)m11, (double)m12, (double)m21, (double)m22, (double)dx, (double)dy);
	return;
}
double qt_QWMatrix_m11( qt_QWMatrix* instPointer){
	return (double) ((QWMatrixBridge*)instPointer)->m11();
}
double qt_QWMatrix_m12( qt_QWMatrix* instPointer){
	return (double) ((QWMatrixBridge*)instPointer)->m12();
}
double qt_QWMatrix_m21( qt_QWMatrix* instPointer){
	return (double) ((QWMatrixBridge*)instPointer)->m21();
}
double qt_QWMatrix_m22( qt_QWMatrix* instPointer){
	return (double) ((QWMatrixBridge*)instPointer)->m22();
}
double qt_QWMatrix_dx( qt_QWMatrix* instPointer){
	return (double) ((QWMatrixBridge*)instPointer)->dx();
}
double qt_QWMatrix_dy( qt_QWMatrix* instPointer){
	return (double) ((QWMatrixBridge*)instPointer)->dy();
}
void qt_QWMatrix_map( qt_QWMatrix* instPointer,int x, int y, int* tx, int* ty){
	((QWMatrixBridge*)instPointer)->map((int)x, (int)y, (int*)tx, (int*)ty);
	return;
}
void qt_QWMatrix_map1( qt_QWMatrix* instPointer,double x, double y, double* tx, double* ty){
	((QWMatrixBridge*)instPointer)->map((double)x, (double)y, (double*)tx, (double*)ty);
	return;
}
qt_QRect* qt_QWMatrix_mapRect( qt_QWMatrix* instPointer,qt_QRect* arg1){
	QRect _r= ((QWMatrixBridge*)instPointer)->mapRect((QRect&)* (QRect*)arg1);
	return (qt_QRect*)new QRect(_r.left(),_r.top(),_r.width(),_r.height());
}
qt_QPoint* qt_QWMatrix_map2( qt_QWMatrix* instPointer,qt_QPoint* p){
	QPoint _p= ((QWMatrixBridge*)instPointer)->map((QPoint&)* (QPoint*)p);
	return (qt_QPoint*)new QPoint(_p.x(),_p.y());
}
qt_QRect* qt_QWMatrix_map3( qt_QWMatrix* instPointer,qt_QRect* r){
	QRect _r= ((QWMatrixBridge*)instPointer)->map((QRect&)* (QRect*)r);
	return (qt_QRect*)new QRect(_r.left(),_r.top(),_r.width(),_r.height());
}
qt_QPointArray* qt_QWMatrix_map4( qt_QWMatrix* instPointer,qt_QPointArray* a){
	return (qt_QPointArray*)new QPointArray(((QWMatrixBridge*)instPointer)->map((QPointArray&)* (QPointArray*)a));
}
void qt_QWMatrix_reset( qt_QWMatrix* instPointer){
	((QWMatrixBridge*)instPointer)->reset();
	return;
}
int qt_QWMatrix_isIdentity( qt_QWMatrix* instPointer){
	return (int) ((QWMatrixBridge*)instPointer)->isIdentity();
}
qt_QWMatrix * qt_QWMatrix_translate( qt_QWMatrix* instPointer,double dx, double dy){
	return (qt_QWMatrix *) ( QWMatrix *)&((QWMatrixBridge*)instPointer)->translate((double)dx, (double)dy);
}
qt_QWMatrix * qt_QWMatrix_scale( qt_QWMatrix* instPointer,double sx, double sy){
	return (qt_QWMatrix *) ( QWMatrix *)&((QWMatrixBridge*)instPointer)->scale((double)sx, (double)sy);
}
qt_QWMatrix * qt_QWMatrix_shear( qt_QWMatrix* instPointer,double sh, double sv){
	return (qt_QWMatrix *) ( QWMatrix *)&((QWMatrixBridge*)instPointer)->shear((double)sh, (double)sv);
}
qt_QWMatrix * qt_QWMatrix_rotate( qt_QWMatrix* instPointer,double a){
	return (qt_QWMatrix *) ( QWMatrix *)&((QWMatrixBridge*)instPointer)->rotate((double)a);
}
int qt_QWMatrix_isInvertible( qt_QWMatrix* instPointer){
	return (int) ((QWMatrixBridge*)instPointer)->isInvertible();
}
qt_QWMatrix * qt_QWMatrix_invert( qt_QWMatrix* instPointer,int* arg1){
	QWMatrix _m= ((QWMatrixBridge*)instPointer)->invert((bool*)arg1);
	return (qt_QWMatrix *)new QWMatrix(_m.m11(),_m.m12(),_m.m21(),_m.m22(),_m.dx(),_m.dy());
}
