/***************************************************************************
                          QPainter.h  -  description
                             -------------------
    begin                : Wed Mar 8 2000
    copyright            : (C) 2000 by Richard Dale
    email                : Richard_Dale@tipitina.demon.co.uk
 ***************************************************************************/

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

#ifndef QPAINTER_H
#define QPAINTER_H

#include <Foundation/NSObject.h>
#include <Foundation/NSString.h>
#include <Foundation/NSArray.h>

#include <qtobjc/QPaintDevice.h>
#include <qtobjc/QWidget.h>
#include <qtobjc/QFontMetrics.h>
#include <qtobjc/QFontInfo.h>
#include <qtobjc/QFont.h>
#include <qtobjc/QPen.h>
#include <qtobjc/QBrush.h>
#include <qtobjc/QColor.h>
#include <qtobjc/QRect.h>
#include <qtobjc/QPicture.h>
#include <qtobjc/QObject.h>
#include <qtobjc/QRegion.h>

/**
  *@author Richard Dale
  */

@interface QPainter : NSObject <QtSupport>
{
@private
	void *	_qt;
}

- init;
- initPaintDevice: (QPaintDevice *) device;
- (void) dealloc;

- (BOOL) begin: (QPaintDevice *) device;
- (BOOL) begin: (QPaintDevice *) device withWidget: (QWidget *) widget;
- (BOOL) end;
- (QPaintDevice *) device;
+  redirect: (QPaintDevice *) pdev to: (QPaintDevice *) replacement;
- (BOOL) isActive;
- flush;
- save;
- restore;
- (QFontMetrics *) fontMetrics;
- (QFontInfo *) fontInfo;
- (QFont *) font;
- setFont: (QFont *) font;
- (QPen *) pen;
- setPen: (QPen *) pen;
- setPenStyle: (int) pen;
- setPenColor: (QColor *) color;
- (QBrush *) brush;
- setBrush: (QBrush *) brush;
- setBrushStyle: (int) brush;
- setBrushColor: (QColor *) color;
- (QColor *) backgroundColor;
- setBackgroundColor: (QColor *) color;
- (int) backgroundMode;
- setBackgroundMode: (int) mode;
- (int) rasterOp;
- setRasterOp: (int) op;
- (QPoint *) brushOrigin;
- setBrushOrigin: (int) x : (int) y;
- setBrushOrigin: (QPoint *) point;
- setViewXForm: (BOOL) yn;		
- (BOOL) hasViewXForm;
- (QRect *) window;		
- setWindow: (QRect *) rect;	
- setWindow: (int) x : (int) y : (int) w : (int) h;
- (QRect* ) viewport;		
- setViewport: (QRect *) rect;	
- setViewport: (int) x : (int) y : (int) w : (int) h;
- setWorldXForm: (BOOL) yn;		
- (BOOL) hasWorldXForm;
- (QWMatrix *) worldMatrix;	
- setWorldMatrix: (QWMatrix *) matrix combine: (BOOL) yn;
- translate: (float) dx : (float) dy;
- scale: (float) sx : (float) sy;
- shear: (float) sh : (float) sv;
- rotate: (float) a;

- resetXForm;
- (QPoint *) xFormPoint: (QPoint *) point;	
- (QRect *) xFormRect: (QRect *) rect;
- (NSArray *) xFormArray: (NSArray *) array;
- (NSArray *) xFormArray: (NSArray *) array index: (int) i npoints: (int) n;

- (QPoint *) xFormDevPoint: (QPoint *) point;
- (QRect *) xFormDevRect: (QRect *) rect;
- (NSArray *) xFormDevArray: (NSArray *) array;
- (NSArray *) xFormDevArray: (NSArray *) index: (int) i npoints: (int) n;

- setClipping: (BOOL) yn;		
- (BOOL) hasClipping;
- (QRegion *) clipRegion;
- setClipRect: (QRect *) rect;	
- setClipRect: (int) x : (int) y : (int) w : (int) h;
- setClipRegion: (QRegion *) region;

- drawPoint: (int) x : (int) y;
- drawPoint: (QPoint *) point;
- drawPoints: (NSArray *) a index: (int) i npoints: (int) n;
- moveTo: (int) x : (int) y;
- moveTo: (QPoint *) point;
- lineTo: (int) x : (int) y;
- lineTo: (QPoint *) point;
- drawLineFrom: (int) x1 : (int) y1 to: (int) x2 : (int) y2;
- drawLineFrom: (QPoint *) from to: (QPoint *) to;
- drawRect: (int) x : (int) y : (int) w : (int) h;
- drawRect: (QRect *) rect;
- drawWinFocusRect: (int) x : (int) y : (int) w : (int) h;
- drawWinFocusRect: (int) x : (int) y : (int) w : (int) h color: (QColor *) bgColor;
- drawWinFocusRect: (QRect *) rect;
- drawWinFocusRect: (QRect *) color: (QColor *) bgColor;
- drawRoundRect: (int) x : (int) y : (int) w : (int) h rect: (int) r length: (int) alen;
- drawRoundRect: (QRect *) rect rect: (int) r length: (int) alen;
- drawEllipse: (int) x : (int) y : (int) w : (int) h;
- drawEllipse: (QRect *) rect;
- drawArc: (int) x : (int) y : (int) w : (int) h startAngle: (int) a arcLength: (int) alen;
- drawArc: (QRect *) rect startAngle: (int) a arcLength: (int) alen;
- drawPie: (int) x : (int) y : (int) w : (int) h startAngle: (int) a arcLength: (int) alen;
- drawPie: (QRect *) rect startAngle: (int) a length: (int) alen;
- drawChord: (int) x : (int) y : (int) w : (int) h startAngle: (int) a arcLength: (int) alen;
- drawChord: (QRect *)  rect startAngle: (int) a arcLength: (int) alen;
- drawLineSegments: (NSArray *) segments index: (int) i nlines: (int) n;
- drawPolyline: (NSArray *) array index: (int) i npoints: (int) n;
- drawPolygon: (NSArray *) winding: (BOOL) yn index: (int) i npoints: (int) n;
- drawQuadBezier: (NSArray *) array index: (int) i;
- drawPixmap: (int) x : (int) y map: (QPixmap *) map sx: (int) sx sy: (int) sy sw: (int) sw sh: (int) sh;
- drawPixmap: (QPoint *) point map: (QPixmap *) pixmap rect: (QRect *) sr;
- drawPixmap: (QPoint *) point map: (QPixmap *) map;
- drawImage: (int) x : (int) y image: (QImage *) image sx: (int) sx sy: (int) sy sw: (int) sw sh: (int) sh;
- drawImage: (QPoint *) point image: (QImage *) image rect: (QRect *) sr;
- drawImage: (QPoint *) point image: (QImage *) image;
- drawTiledPixmap: (int) x : (int) y : (int) w : (int) h map: (QPixmap *) map sx: (int) sx sy: (int) sy;
- drawTiledPixmap: (QRect *) rect map: (QPixmap *) map at: (QPoint *) point;
- drawTiledPixmap: (QRect *) rect map: (QPixmap *) map;

- drawPicture: (QPicture *) picture;

- fillRect: (int) x : (int) y : (int) w : (int) h brush: (QBrush *) brush;
- fillRect: (QRect *) rect brush: (QBrush *) brush;
- eraseRect: (int) x : (int) y : (int) w : (int) h;
- eraseRect: (QRect *) rect;

- drawText: (int) x : (int) y text: (NSString *) str length: (int) len;
- drawText: (QPoint *) point text: (NSString *) str length: (int) len;
- drawText: (int) x : (int) y : (int) w : (int) h flags: (int) flags text: (NSString *) str length: (int) len breaks: (QRect *) br;
- drawText: (QRect *) rect flags: (int) flags text: (NSString *) str length: (int) len breaks: (QRect *) br;

- (QRect *) boundingRect: (int) x : (int) y : (int) w : (int) h flags: (int) flags text: (NSString *) str length: (int) length;
- (QRect *) boundingRect: (QRect *) rect flags: (int) flags text: (NSString *) str length: (int) length;

- (int) tabStops;
- setTabStops: (int) stops;
- (NSArray *) tabArray;
- setTabArray: (NSArray *) tabArray;

- (HANDLE) handle;

+  initialize;
+  cleanup;

@end

#endif

Documentation generated by duke@tipitina on Sat May 6 11:42:52 EDT 2000