/***************************************************************************
                            QCanvasPolygonalItem.m -  description
                             -------------------
    begin                : Wed Nov 21 12:08:37 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 12:08:37 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.                       *
 *                                                                         *
 ***************************************************************************/

#include <qtc/qt_QString.h>
#include <qtc/qt_QCString.h>
#include <qtc/qt_QCanvasPolygonalItem.h>
#include <qtobjc/QCanvasPolygonalItem.h>
#include <qtobjc/QPen.h>
#include <qtobjc/QBrush.h>

@implementation  QCanvasPolygonalItem


- (void) dealloc
{
	if ([self qt] != 0L) {
		if ([self allocatedInObjcWorld]) {
			qt_del_QCanvasPolygonalItem((qt_QCanvasPolygonalItem *)[self qt]);
		}
		[QtSupport removeQtKey: [self qt]];
		[self setQt: 0L];
	}
	[super dealloc];
}

- (BOOL) collidesWith: (QCanvasItem*)arg1
{
	return (BOOL) qt_QCanvasPolygonalItem_collidesWith((qt_QCanvasPolygonalItem *)[self qt], (qt_QCanvasItem*) [arg1 qt]);
}

- setPen: (QPen*)p
{
	qt_QCanvasPolygonalItem_setPen((qt_QCanvasPolygonalItem *)[self qt], (qt_QPen*) [p qt]);
	return self;
}

- setBrush: (QBrush*)b
{
	qt_QCanvasPolygonalItem_setBrush((qt_QCanvasPolygonalItem *)[self qt], (qt_QBrush*) [b qt]);
	return self;
}

- (QPen*) pen
{
	return (QPen*) [QtSupport objectForQtKey: qt_QCanvasPolygonalItem_pen((qt_QCanvasPolygonalItem *)[self qt]) withClass: [QPen class] allocatedInObjcWorld: YES];
}

- (QBrush*) brush
{
	return (QBrush*) [QtSupport objectForQtKey: qt_QCanvasPolygonalItem_brush((qt_QCanvasPolygonalItem *)[self qt]) withClass: [QBrush class] allocatedInObjcWorld: YES];
}

- (QPointArray*) areaPoints
{
	return (QPointArray*) [QtSupport objectForQtKey: qt_QCanvasPolygonalItem_areaPoints((qt_QCanvasPolygonalItem *)[self qt]) withClass: [QPointArray class] allocatedInObjcWorld: YES];
}

- (QPointArray*) areaPointsAdvanced
{
	return (QPointArray*) [QtSupport objectForQtKey: qt_QCanvasPolygonalItem_areaPointsAdvanced((qt_QCanvasPolygonalItem *)[self qt]) withClass: [QPointArray class] allocatedInObjcWorld: YES];
}

- (QRect*) boundingRect
{
	return (QRect*) [QtSupport objectForQtKey: qt_QCanvasPolygonalItem_boundingRect((qt_QCanvasPolygonalItem *)[self qt]) withClass: [QRect class] allocatedInObjcWorld: YES];
}

- (int) rtti
{
	return (int) qt_QCanvasPolygonalItem_rtti((qt_QCanvasPolygonalItem *)[self qt]);
}

@end
