1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
/*
* Kivio - Visual Modelling and Flowcharting
* Copyright (C) 2000-2001 theKompany.com & Dave Marotti
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef KIVIO_SCREEN_PAINTER_H
#define KIVIO_SCREEN_PAINTER_H
#include "kivio_painter.h"
#include <tqfont.h>
#include <tqpainter.h>
#include <tqpixmap.h>
class KivioPoint;
class KivioScreenPainter : public KivioPainter
{
protected:
TQPainter *m_pPainter;
float m_transX, m_transY;
int m_rotation;
public:
KivioScreenPainter();
KivioScreenPainter(TQPainter* painter);
virtual ~KivioScreenPainter();
virtual bool start( TQPaintDevice * );
virtual bool stop();
TQPainter *painter() { return m_pPainter; }
void setPainter(TQPainter* p) { m_pPainter = p; }
/*\
|*|
|*| PRIMITIVE IMPLEMENTATIONS
|*|
|*|
\*/
void drawLine( float, float, float, float );
void drawArc( float, float, float, float, float, float );
void drawBezier( TQPointArray & );
void drawRect( float, float, float, float );
void fillRect( float, float, float, float );
void drawRoundRect( float, float, float, float, float, float );
void fillRoundRect( float, float, float, float, float, float );
void drawPie( float, float, float, float, float, float );
void fillPie( float, float, float, float, float, float );
void drawChord( float, float, float, float, float, float );
void fillChord( float, float, float, float, float, float );
void drawEllipse( float, float, float, float );
void fillEllipse( float, float, float, float );
void drawLineArray( TQPtrList<KivioPoint> * );
void drawPolyline( TQPtrList<KivioPoint> * );
void drawPolygon( TQPtrList<KivioPoint> * );
void drawPolyline( TQPointArray & );
void drawPolygon( TQPointArray & );
void drawLineArray( TQPointArray & );
void drawClosedPath( TQPtrList<KivioPoint> * );
void drawOpenPath( TQPtrList<KivioPoint> * );
void setFont( const TQFont & );
void drawText( int x, int y, int w, int h, int tf,
const TQString &str );
virtual TQRect boundingRect( int, int, int, int, int, const TQString & );
void drawPixmap( float, float, const TQPixmap & );
void drawHandle( float, float, int );
virtual void drawSelectionBox( const TQRect& );
virtual void saveState();
virtual void restoreState();
virtual void setTranslation(float, float);
virtual void translateBy(float, float);
virtual void setRotation(int);
virtual void rotateBy(int);
virtual int rotation();
virtual void setWorldMatrix(TQWMatrix, bool);
};
#endif
|