~ubuntu-branches/ubuntu/breezy/koffice/breezy

« back to all changes in this revision

Viewing changes to karbon/render/vpainter.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040509113300-vfrdadqsvjfuhn3b
Tags: 1:1.3.1-1
* New upstream bugfix release.
* Built against newer imagemagick (closes: #246623).
* Made koffice-libs/kformula recommend/depend on latex-xft-fonts, which
  provides mathematical fonts that the formula editor can use.  Also
  patched the kformula part to make these fonts the default.
* Changed kword menu hint from "WordProcessors" to "Word processors"
  (closes: #246209).
* Spellchecker configuration is now fixed (closes: #221256, #227568).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the KDE project
 
2
   Copyright (C) 2001, The Karbon Developers
 
3
   Copyright (C) 2002, The Karbon Developers
 
4
 
 
5
   This library is free software; you can redistribute it and/or
 
6
   modify it under the terms of the GNU Library General Public
 
7
   License as published by the Free Software Foundation; either
 
8
   version 2 of the License, or (at your option) any later version.
 
9
 
 
10
   This library is distributed in the hope that it will be useful,
 
11
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
   Library General Public License for more details.
 
14
 
 
15
   You should have received a copy of the GNU Library General Public License
 
16
   along with this library; see the file COPYING.LIB.  If not, write to
 
17
   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
18
   Boston, MA 02111-1307, USA.
 
19
 
 
20
*/
 
21
 
 
22
#ifndef __VPAINTER_H__
 
23
#define __VPAINTER_H__
 
24
 
 
25
// painter abstraction
 
26
 
 
27
#include <qnamespace.h>
 
28
#include <koRect.h>
 
29
#include <vfillrule.h>
 
30
 
 
31
class QWMatrix;
 
32
class QPaintDevice;
 
33
class QColor;
 
34
class QPen;
 
35
class QBrush;
 
36
class QImage;
 
37
 
 
38
class VStroke;
 
39
class VFill;
 
40
 
 
41
class KoPoint;
 
42
class KoRect;
 
43
 
 
44
class VPainter
 
45
{
 
46
public:
 
47
        VPainter( QPaintDevice *, unsigned int /*w*/ = 0, unsigned int /*h*/ = 0 ) {};
 
48
        virtual ~VPainter() {};
 
49
 
 
50
        //
 
51
        virtual void resize( unsigned int w, unsigned int h ) = 0;
 
52
        virtual void begin() = 0;
 
53
        virtual void end() = 0;
 
54
        virtual void blit( const KoRect & ) = 0;
 
55
        virtual void clear( const QColor & ) = 0;
 
56
        virtual void clear( const KoRect &, const QColor & ) = 0;
 
57
 
 
58
        // matrix manipulation
 
59
        virtual void setWorldMatrix( const QWMatrix & ) = 0;
 
60
        virtual const QWMatrix worldMatrix() = 0;
 
61
        virtual void setZoomFactor( double ) = 0;
 
62
        virtual double zoomFactor() { return 1.0; }
 
63
 
 
64
        // drawing
 
65
        virtual void moveTo( const KoPoint & ) = 0;
 
66
        virtual void lineTo( const KoPoint & ) = 0;
 
67
        virtual void curveTo( const KoPoint &, const KoPoint &, const KoPoint & ) = 0;
 
68
        virtual void newPath() = 0;
 
69
        virtual void strokePath() = 0;
 
70
        virtual void fillPath() = 0;
 
71
        virtual void setFillRule( VFillRule ) = 0;
 
72
        virtual void setClipPath() = 0;
 
73
        virtual void resetClipPath() = 0;
 
74
 
 
75
        // helper
 
76
        virtual void drawNode( const KoPoint& , int ) {}
 
77
        virtual void drawRect( const KoRect & ) {}
 
78
        virtual void drawRect( double, double, double, double ) {}
 
79
 
 
80
        // pen + brush
 
81
        virtual void setPen( const VStroke & ) = 0;
 
82
        // compatibility, use VPen/VBrush later ?
 
83
        virtual void setPen( const QColor & ) = 0;
 
84
        virtual void setPen( Qt::PenStyle style ) = 0;
 
85
        virtual void setBrush( const VFill & ) = 0;
 
86
        virtual void setBrush( const QColor & ) = 0;
 
87
        virtual void setBrush( Qt::BrushStyle style ) = 0;
 
88
 
 
89
        virtual void drawImage( const QImage &, const QWMatrix & ) {}
 
90
 
 
91
        // stack management
 
92
        virtual void save() = 0;
 
93
        virtual void restore() = 0;
 
94
 
 
95
        // we have to see how this fits in
 
96
        virtual void setRasterOp( Qt::RasterOp ) = 0;
 
97
 
 
98
        // access to device
 
99
        virtual QPaintDevice *device() = 0;
 
100
};
 
101
 
 
102
#endif