/***************************************************************************
                            qt_QPointArray.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_QPointArray.h"
}

#include <qpointarray.h>
#include <qrect.h>

class QPointArrayBridge : public QPointArray
{
public:
	QPointArrayBridge() : QPointArray() {}
	~QPointArrayBridge() {}
	QPointArrayBridge(const QRect& r, bool closed) : QPointArray(r, closed) {}
	QPointArrayBridge(int nPoints, const QCOORD* points) : QPointArray(nPoints, points) {}
};

qt_QPointArray * qt_new_QPointArray(){
	return (qt_QPointArray *) new QPointArrayBridge();
}
void qt_del_QPointArray( qt_QPointArray* p ){
	delete (QPointArrayBridge*) p;
}
qt_QPointArray * qt_new_QPointArray3(qt_QRect* r, int closed){
	return (qt_QPointArray *) new QPointArrayBridge((QRect&)* (QRect*)r, (bool)closed);
}
qt_QPointArray * qt_new_QPointArray4(int nPoints, short * points){
	return (qt_QPointArray *) new QPointArrayBridge((int)nPoints, (QCOORD*)points);
}
qt_QPointArray* qt_QPointArray_copy( qt_QPointArray* instPointer){
	return (qt_QPointArray*)new QPointArray(((QPointArrayBridge*)instPointer)->copy());
}
void qt_QPointArray_translate( qt_QPointArray* instPointer,int dx, int dy){
	((QPointArrayBridge*)instPointer)->translate((int)dx, (int)dy);
	return;
}
qt_QRect* qt_QPointArray_boundingRect( qt_QPointArray* instPointer){
	QRect _r= ((QPointArrayBridge*)instPointer)->boundingRect();
	return (qt_QRect*)new QRect(_r.left(),_r.top(),_r.width(),_r.height());
}
void qt_QPointArray_point( qt_QPointArray* instPointer,unsigned int i, int* x, int* y){
	((QPointArrayBridge*)instPointer)->point((uint)i, (int*)x, (int*)y);
	return;
}
qt_QPoint* qt_QPointArray_point1( qt_QPointArray* instPointer,unsigned int i){
	QPoint _p= ((QPointArrayBridge*)instPointer)->point((uint)i);
	return (qt_QPoint*)new QPoint(_p.x(),_p.y());
}
void qt_QPointArray_setPoint( qt_QPointArray* instPointer,unsigned int i, int x, int y){
	((QPointArrayBridge*)instPointer)->setPoint((uint)i, (int)x, (int)y);
	return;
}
void qt_QPointArray_setPoint1( qt_QPointArray* instPointer,unsigned int i, qt_QPoint* p){
	((QPointArrayBridge*)instPointer)->setPoint((uint)i, (QPoint&)* (QPoint*)p);
	return;
}
int qt_QPointArray_setPoints( qt_QPointArray* instPointer,int nPoints, short * points){
	return (int) ((QPointArrayBridge*)instPointer)->setPoints((int)nPoints, (QCOORD*)points);
}
int qt_QPointArray_putPoints( qt_QPointArray* instPointer,int index, int nPoints, short * points){
	return (int) ((QPointArrayBridge*)instPointer)->putPoints((int)index, (int)nPoints, (QCOORD*)points);
}
int qt_QPointArray_putPoints2( qt_QPointArray* instPointer,int index, int nPoints, qt_QPointArray* from, int fromIndex){
	return (int) ((QPointArrayBridge*)instPointer)->putPoints((int)index, (int)nPoints, (QPointArray&)* (QPointArray*)from, (int)fromIndex);
}
void qt_QPointArray_makeArc( qt_QPointArray* instPointer,int x, int y, int w, int h, int a1, int a2){
	((QPointArrayBridge*)instPointer)->makeArc((int)x, (int)y, (int)w, (int)h, (int)a1, (int)a2);
	return;
}
void qt_QPointArray_makeEllipse( qt_QPointArray* instPointer,int x, int y, int w, int h){
	((QPointArrayBridge*)instPointer)->makeEllipse((int)x, (int)y, (int)w, (int)h);
	return;
}
void qt_QPointArray_makeArc1( qt_QPointArray* instPointer,int x, int y, int w, int h, int a1, int a2, qt_QWMatrix * arg1){
	((QPointArrayBridge*)instPointer)->makeArc((int)x, (int)y, (int)w, (int)h, (int)a1, (int)a2, (QWMatrix&)* (QWMatrix*)arg1);
	return;
}
qt_QPointArray* qt_QPointArray_cubicBezier( qt_QPointArray* instPointer){
	return (qt_QPointArray*)new QPointArray(((QPointArrayBridge*)instPointer)->cubicBezier());
}
void* qt_QPointArray_shortPoints( qt_QPointArray* instPointer,int index, int nPoints){
	return (void*) ((QPointArrayBridge*)instPointer)->shortPoints((int)index, (int)nPoints);
}
void qt_QPointArray_cleanBuffers( ){
	QPointArrayBridge::cleanBuffers();
	return;
}
unsigned int qt_QPointArray_count(qt_QPointArray* instPointer){
	return (int) ((QPointArrayBridge*)instPointer)->count();
}
qt_QPoint * qt_QPointArray_at(qt_QPointArray* instPointer,unsigned int i){
	QPoint _p= ((QPointArrayBridge*)instPointer)->at((uint)i);
	return (qt_QPoint *)new QPoint(_p.x(),_p.y());
}
